diff options
author | Ben Straub <bs@github.com> | 2014-01-22 14:14:37 -0800 |
---|---|---|
committer | Ben Straub <bs@github.com> | 2014-01-22 14:14:37 -0800 |
commit | ab4bcc038aebb68975935809cd328fc9ccb70ba7 (patch) | |
tree | 12a5f497639bc1c75e6154fd2548f9dbdd10ae0c /src | |
parent | e82b6d13d21c99eb95ae6721eb0e89101c3256c4 (diff) | |
download | libgit2-ab4bcc038aebb68975935809cd328fc9ccb70ba7.tar.gz |
Plug a small memory leak
Diffstat (limited to 'src')
-rw-r--r-- | src/checkout.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/checkout.c b/src/checkout.c index 962929075..6769cbc3d 100644 --- a/src/checkout.c +++ b/src/checkout.c @@ -753,8 +753,11 @@ static int checkout_conflicts_load(checkout_data *data, git_iterator *workdir, g conflict->theirs = theirs; if ((error = checkout_conflict_detect_submodule(conflict)) < 0 || - (error = checkout_conflict_detect_binary(data->repo, conflict)) < 0) + (error = checkout_conflict_detect_binary(data->repo, conflict)) < 0) + { + git__free(conflict); goto done; + } git_vector_insert(&data->conflicts, conflict); } |