Commit 9f1b54d6 by Carlos Martín Nieto

config: also free the file buffer on error

On error, the buffer containing the file contents also needs to be
freed.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
parent fe116e26
......@@ -210,6 +210,7 @@ int git_config_open(git_config **cfg_out, const char *path)
cvar_list_free(cfg->vars);
if(cfg->file_path)
free(cfg->file_path);
gitfo_free_buf(&cfg->reader.buffer);
free(cfg);
return error;
......
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