]> granicus.if.org Git - git/commitdiff
transport: free leaking head in transport_print_push_status()
authorStefan Beller <sbeller@google.com>
Tue, 21 Oct 2014 01:50:44 +0000 (18:50 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 21 Oct 2014 18:01:18 +0000 (11:01 -0700)
Found by scan.coverity.com (ID: 1248110)

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
transport.c

index 662421bb5e076177f0fc320330287d3da50303a5..cb62cb68861635df45b6c3b3db1e1bcf5e281db2 100644 (file)
@@ -774,6 +774,7 @@ void transport_print_push_status(const char *dest, struct ref *refs,
                        *reject_reasons |= REJECT_NEEDS_FORCE;
                }
        }
+       free(head);
 }
 
 void transport_verify_remote_names(int nr_heads, const char **heads)