浏览代码

Fixed mem leak

isundil 10 年之前
父节点
当前提交
9e58669875
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/pathutil.c

+ 1 - 0
src/pathutil.c

@@ -12,6 +12,7 @@ void find_fullpath(char **path, int _free)
 	asprintf(&result, "%s/%s", cwd, *path);
 	if (_free)
 		free(*path);
+	free(cwd);
 	*path = result;
 }