Code

fetch: free all the additional refspecs
authorCarlos Martín Nieto <cmn@elego.de>
Fri, 7 Oct 2011 22:51:06 +0000 (00:51 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 7 Oct 2011 23:02:19 +0000 (16:02 -0700)
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fetch.c

index e422ced9299521bb2e7f3c5ff59a434c8403a4ea..605d1bfd66dfcfdba04073454a784737805d6bcc 100644 (file)
@@ -918,7 +918,7 @@ static int fetch_one(struct remote *remote, int argc, const char **argv)
        atexit(unlock_pack);
        refspec = parse_fetch_refspec(ref_nr, refs);
        exit_code = do_fetch(transport, refspec, ref_nr);
-       free(refspec);
+       free_refspec(ref_nr, refspec);
        transport_disconnect(transport);
        transport = NULL;
        return exit_code;