Commit a15d3537 by Carlos Martín Nieto

sysdir: free the path if we cannot find the file

Returning an error cleared the buf, but this operation does not free the
memory associated with it. Use git_buf_free() instead.
parent bfc50f83
......@@ -213,7 +213,7 @@ static int git_sysdir_find_in_dirlist(
return 0;
}
git_buf_clear(path);
git_buf_free(path);
giterr_set(GITERR_OS, "The %s file '%s' doesn't exist", label, name);
return GIT_ENOTFOUND;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment