diff options
author | Stefan Beller <stefanbeller@gmail.com> | 2014-08-10 15:57:56 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-08-10 16:41:14 -0700 |
commit | 50b6773287503cb76d1f4020245bbd119c410961 (patch) | |
tree | bb144a079984d0aea615541d56e6984a46713374 | |
parent | remote.c: don't leak the base branch name in format_tracking_info (diff) | |
download | tgif-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>
-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; } |