提交 b2025146 编写于 作者: J Junio C Hamano

http.c: avoid freeing an uninitialized pointer

An earlier 59b8d38f (http.c: remove verification of remote packs) left
the variable "url" uninitialized; "goto cleanup" codepath can free it
which is not very nice.
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 59b8d38f
......@@ -866,7 +866,7 @@ static int fetch_pack_index(unsigned char *sha1, const char *base_url)
int ret = 0;
char *hex = xstrdup(sha1_to_hex(sha1));
char *filename;
char *url;
char *url = NULL;
struct strbuf buf = STRBUF_INIT;
if (has_pack_index(sha1)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册