提交 50b67732 编写于 作者: S Stefan Beller 提交者: Junio C Hamano

clone.c: don't leak memory in cmd_clone

Free the refspec.
Found by scan.coverity.com (Id: 1127806)
Signed-off-by: NStefan Beller <stefanbeller@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 2f50babe
......@@ -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;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册