Merge branch 'jk/fix-leak-send-pack'
Leakfix. * jk/fix-leak-send-pack: send-pack: clean-up even when taking an early exit send-pack: clean up extra_have oid array
This commit is contained in:
@@ -304,9 +304,10 @@ int cmd_send_pack(int argc,
|
||||
flags |= MATCH_REFS_MIRROR;
|
||||
|
||||
/* match them up */
|
||||
if (match_push_refs(local_refs, &remote_refs, &rs, flags))
|
||||
return -1;
|
||||
|
||||
if (match_push_refs(local_refs, &remote_refs, &rs, flags)) {
|
||||
ret = -1;
|
||||
goto cleanup;
|
||||
}
|
||||
if (!is_empty_cas(&cas))
|
||||
apply_push_cas(&cas, remote, remote_refs);
|
||||
|
||||
@@ -339,10 +340,12 @@ int cmd_send_pack(int argc,
|
||||
/* stable plumbing output; do not modify or localize */
|
||||
fprintf(stderr, "Everything up-to-date\n");
|
||||
|
||||
cleanup:
|
||||
string_list_clear(&push_options, 0);
|
||||
free_refs(remote_refs);
|
||||
free_refs(local_refs);
|
||||
refspec_clear(&rs);
|
||||
oid_array_clear(&extra_have);
|
||||
oid_array_clear(&shallow);
|
||||
clear_cas_option(&cas);
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user