mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-08 19:51:31 +00:00
Config file open: don't free memory that doesn't belong to us
On error, it would free the configuration object even though it didn't own that memory, which would cause a double-free. This fixes the first part of Issue #210 Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
This commit is contained in:
parent
4191d52924
commit
a5f43b9536
@ -261,7 +261,6 @@ static int config_open(git_config_file *cfg)
|
||||
cleanup:
|
||||
cvar_list_free(&b->var_list);
|
||||
gitfo_free_buf(&b->reader.buffer);
|
||||
free(cfg);
|
||||
|
||||
return git__rethrow(error, "Failed to open config");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user