mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-08 06:15:02 +00:00
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>
This commit is contained in:
parent
fe116e261f
commit
9f1b54d6d0
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user