From be054f6149c32a411798fe285e91b292f0b29e77 Mon Sep 17 00:00:00 2001 From: Paulo Matos Date: Tue, 19 Feb 2019 13:07:04 +0100 Subject: [PATCH] free buf to avoid memory leak --- racket/src/start/ustart.c | 1 + 1 file changed, 1 insertion(+) diff --git a/racket/src/start/ustart.c b/racket/src/start/ustart.c index 2710de2c82..f2733ebd4e 100644 --- a/racket/src/start/ustart.c +++ b/racket/src/start/ustart.c @@ -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;