free buf to avoid memory leak

This commit is contained in:
Paulo Matos 2019-02-19 13:07:04 +01:00 committed by Matthew Flatt
parent f75c641bb8
commit be054f6149

View File

@ -372,6 +372,7 @@ int main(int argc, char **argv)
long buflen = 4096;
buf = (char *)malloc(buflen);
me = path_append(getcwd(buf, buflen), me);
free(buf);
} else {
/* We have to find the executable by searching PATH: */
char *path = copy_string(getenv("PATH")), *p, *m;