summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8da61a2)
raw | patch | inline | side by side (parent: 8da61a2)
author | Andreas Gruenbacher <agruen@suse.de> | |
Mon, 15 Mar 2010 22:18:48 +0000 (23:18 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 20 Mar 2010 16:28:48 +0000 (09:28 -0700) |
A temporary struct ref is allocated in store_updated_refs() but not
freed.
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
freed.
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-fetch.c | patch | blob | history |
diff --git a/builtin-fetch.c b/builtin-fetch.c
index 8dd1adf84994374713d225395ed7fb074406952b..bbc425b655e456d57e37118690a088351162ff3c 100644 (file)
--- a/builtin-fetch.c
+++ b/builtin-fetch.c
fputc(url[i], fp);
fputc('\n', fp);
- if (ref)
+ if (ref) {
rc |= update_local_ref(ref, what, note);
- else
+ free(ref);
+ } else
sprintf(note, "* %-*s %-*s -> FETCH_HEAD",
SUMMARY_WIDTH, *kind ? kind : "branch",
REFCOL_WIDTH, *what ? what : "HEAD");