diff options
author | Stefan Beller <stefanbeller@gmail.com> | 2014-08-10 17:57:56 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-08-11 03:41:14 +0400 |
commit | 50b6773287503cb76d1f4020245bbd119c410961 (patch) | |
tree | bb144a079984d0aea615541d56e6984a46713374 /builtin/clone.c | |
parent | 2f50babef18db3ca90b0b75f54d9c36d7a9142b3 (diff) |
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.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; } |