summaryrefslogtreecommitdiff
path: root/copy.c
diff options
context:
space:
mode:
authorLibravatar Stefan Beller <sbeller@google.com>2015-03-20 17:28:00 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-03-22 12:11:25 -0700
commit2d9426b049335c1a39be7ea7416094e944bfe63c (patch)
tree804bff73de68211cdea205d565cbd63abf9bf4a4 /copy.c
parentbuiltin/help.c: fix memory leak (diff)
downloadtgif-2d9426b049335c1a39be7ea7416094e944bfe63c.tar.xz
read-cache: free cache entry in add_to_index in case of early return
This frees `ce` would be leaking in the error path. Additionally a free is moved towards the return. This helps code readability as we often have this pattern of freeing resources just before return/exit and not in between the code. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'copy.c')
0 files changed, 0 insertions, 0 deletions