aboutsummaryrefslogtreecommitdiff
path: root/builtin/clone.c
diff options
context:
space:
mode:
authorStefan Beller <stefanbeller@gmail.com>2014-08-10 15:57:56 +0200
committerJunio C Hamano <gitster@pobox.com>2014-08-10 16:41:14 -0700
commit50b6773287503cb76d1f4020245bbd119c410961 (patch)
treebb144a079984d0aea615541d56e6984a46713374 /builtin/clone.c
parent2f50babef18db3ca90b0b75f54d9c36d7a9142b3 (diff)
downloadgit-50b6773287503cb76d1f4020245bbd119c410961.tar.gz
git-50b6773287503cb76d1f4020245bbd119c410961.tar.xz
clone.c: don't leak memory in cmd_clone
Free the refspec. Found by scan.coverity.com (Id: 1127806) Signed-off-by: Stefan Beller <stefanbeller@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/clone.c')
-rw-r--r--builtin/clone.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/clone.c b/builtin/clone.c
index 545105a86..9129eb799 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;
}