Avoid free the cwd with getcwd()

This commit is contained in:
Max Lv
2017-01-10 22:21:47 +08:00
parent ecf1fcc845
commit dc39af8195
+2
View File
@@ -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
}
}