From dc39af8195ebd61d2947bbedd0d51ceb0f007a35 Mon Sep 17 00:00:00 2001 From: Max Lv Date: Tue, 10 Jan 2017 22:21:47 +0800 Subject: [PATCH] Avoid free the cwd with getcwd() --- src/plugin.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugin.c b/src/plugin.c index b5703611..65b647c4 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -111,7 +111,9 @@ start_plugin(const char *plugin, size_t path_len = strlen(path) + strlen(cwd) + 2; new_path = ss_malloc(path_len); snprintf(new_path, path_len, "%s:%s", cwd, path); +#ifdef __GLIBC__ free(cwd); +#endif } }