summaryrefslogtreecommitdiff
path: root/builtin/clone.c
diff options
context:
space:
mode:
authorStefan Beller <stefanbeller@gmail.com>2014-08-10 13:57:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-08-10 23:41:14 (GMT)
commit50b6773287503cb76d1f4020245bbd119c410961 (patch)
treebb144a079984d0aea615541d56e6984a46713374 /builtin/clone.c
parent2f50babef18db3ca90b0b75f54d9c36d7a9142b3 (diff)
downloadgit-50b6773287503cb76d1f4020245bbd119c410961.zip
git-50b6773287503cb76d1f4020245bbd119c410961.tar.gz
git-50b6773287503cb76d1f4020245bbd119c410961.tar.bz2
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 545105a..9129eb7 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;
}