aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/send-pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/send-pack.c')
-rw-r--r--builtin/send-pack.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/builtin/send-pack.c b/builtin/send-pack.c
index c6e0e9d051..28b69d26b4 100644
--- a/builtin/send-pack.c
+++ b/builtin/send-pack.c
@@ -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;