diff options
| author | Carlos Martín Nieto <cmn@elego.de> | 2011-05-31 13:48:44 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@elego.de> | 2011-05-31 17:33:23 +0200 |
| commit | a5f43b95364e76436df25349f5f7b07e532e8e23 (patch) | |
| tree | d8df2a6bf36d2ba1187d1bc215caec1d982690ab /src | |
| parent | 4191d529245084fa92e869aadda72dd740403d3a (diff) | |
| download | libgit2-a5f43b95364e76436df25349f5f7b07e532e8e23.tar.gz | |
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>
Diffstat (limited to 'src')
| -rw-r--r-- | src/config_file.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/config_file.c b/src/config_file.c index ace7cc8ff..216c07417 100644 --- a/src/config_file.c +++ b/src/config_file.c @@ -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"); } |
