From: Stefan Beller Date: Sun, 10 Aug 2014 13:57:56 +0000 (+0200) Subject: clone.c: don't leak memory in cmd_clone X-Git-Tag: v2.2.0-rc0~162^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/50b6773287503cb76d1f4020245bbd119c410961?ds=inline;hp=--cc clone.c: don't leak memory in cmd_clone Free the refspec. Found by scan.coverity.com (Id: 1127806) Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- 50b6773287503cb76d1f4020245bbd119c410961 diff --git a/builtin/clone.c b/builtin/clone.c index 545105a86f..9129eb799f 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -1000,5 +1000,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix) strbuf_release(&key); strbuf_release(&value); junk_mode = JUNK_LEAVE_ALL; + + free(refspec); return err; }