diff options
| author | Carlos Martín Nieto <cmn@elego.de> | 2011-04-04 15:07:47 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@elego.de> | 2011-04-04 15:33:26 +0200 |
| commit | 9f1b54d6d01bb25c06b2e9d86db922616e2bb566 (patch) | |
| tree | 071fc8933f87ff6f478d44531469795a89ac48a9 /src/config.c | |
| parent | fe116e261ffb7d643c9a6baee70fbfa07a20588f (diff) | |
| download | libgit2-9f1b54d6d01bb25c06b2e9d86db922616e2bb566.tar.gz | |
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>
Diffstat (limited to 'src/config.c')
| -rw-r--r-- | src/config.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c index 4aa0e3691..a4bded952 100644 --- a/src/config.c +++ b/src/config.c @@ -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; |
