commit | 2d9426b049335c1a39be7ea7416094e944bfe63c | [log] [tgz] |
---|---|---|
author | Stefan Beller <sbeller@google.com> | Fri Mar 20 17:28:00 2015 -0700 |
committer | Junio C Hamano <gitster@pobox.com> | Sun Mar 22 12:11:25 2015 -0700 |
tree | 804bff73de68211cdea205d565cbd63abf9bf4a4 | |
parent | fd2014d42b3a4fb865d99e9a7943caa08082cada [diff] |
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>