File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -304,9 +304,10 @@ int cmd_send_pack(int argc,
304304 flags |= MATCH_REFS_MIRROR ;
305305
306306 /* match them up */
307- if (match_push_refs (local_refs , & remote_refs , & rs , flags ))
308- return -1 ;
309-
307+ if (match_push_refs (local_refs , & remote_refs , & rs , flags )) {
308+ ret = -1 ;
309+ goto cleanup ;
310+ }
310311 if (!is_empty_cas (& cas ))
311312 apply_push_cas (& cas , remote , remote_refs );
312313
@@ -339,10 +340,12 @@ int cmd_send_pack(int argc,
339340 /* stable plumbing output; do not modify or localize */
340341 fprintf (stderr , "Everything up-to-date\n" );
341342
343+ cleanup :
342344 string_list_clear (& push_options , 0 );
343345 free_refs (remote_refs );
344346 free_refs (local_refs );
345347 refspec_clear (& rs );
348+ oid_array_clear (& extra_have );
346349 oid_array_clear (& shallow );
347350 clear_cas_option (& cas );
348351 return ret ;
You can’t perform that action at this time.
0 commit comments