From: Junio C Hamano Date: Tue, 18 Oct 2011 04:37:12 +0000 (-0700) Subject: Merge branch 'tc/fetch-leak' X-Git-Tag: v1.7.8-rc0~57 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3f7d11c45421051a010690c3b9cc28bce98b8c3f;p=git.git Merge branch 'tc/fetch-leak' * tc/fetch-leak: fetch: plug two leaks on error exit in store_updated_refs Conflicts: builtin/fetch.c --- 3f7d11c45421051a010690c3b9cc28bce98b8c3f diff --cc builtin/fetch.c index 7a4e41cca,db2c5d905..1adf6c176 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@@ -378,9 -423,10 +378,11 @@@ static int store_updated_refs(const cha else url = xstrdup("foreign"); - if (check_everything_connected(ref_map, 0)) { + rm = ref_map; - if (check_everything_connected(iterate_ref_map, 0, &rm)) - return error(_("%s did not send all necessary objects\n"), url); ++ if (check_everything_connected(iterate_ref_map, 0, &rm)) { + rc = error(_("%s did not send all necessary objects\n"), url); + goto abort; + } for (rm = ref_map; rm; rm = rm->next) { struct ref *ref = NULL;