diff options
author | Vicent Marti <vicent@github.com> | 2014-01-14 10:27:57 -0800 |
---|---|---|
committer | Vicent Marti <vicent@github.com> | 2014-01-14 10:27:57 -0800 |
commit | 557bd1f4108272c6db004aa8b7137d9254c14945 (patch) | |
tree | d7aa5cc74de599df0ba7f1f0e7646b2f5841ec0d /src/config_file.c | |
parent | 0d5d0ea8806cd3d63c3aea6933553ec23920f5a5 (diff) | |
parent | 249537573b8509fc8ed0ae8e51835d084af7c3d2 (diff) | |
download | libgit2-557bd1f4108272c6db004aa8b7137d9254c14945.tar.gz |
Merge pull request #2043 from arthurschreiber/arthur/fix-memory-leaks
Fix a bunch of memory leaks.
Diffstat (limited to 'src/config_file.c')
-rw-r--r-- | src/config_file.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/config_file.c b/src/config_file.c index 2e78f7c8b..c7727c029 100644 --- a/src/config_file.c +++ b/src/config_file.c @@ -1072,8 +1072,10 @@ static int config_parse(diskfile_backend *cfg_file, struct reader *reader, git_c git_buf_printf(&buf, "%s.%s", current_section, var_name); git__free(var_name); - if (git_buf_oom(&buf)) + if (git_buf_oom(&buf)) { + git__free(var_value); return -1; + } var->entry->name = git_buf_detach(&buf); var->entry->value = var_value; |