提交 03b6aeb2 编写于 作者: S Shawn O. Pearce 提交者: Junio C Hamano

http.c: Remove bad free of static block

The filename variable here is pointing to a block of memory that
was allocated by sha1_file.c and is also held in a static variable
scoped within the sha1_pack_name() function.  Doing a free() here is
returning that memory to the allocator while we might still try to
reuse it on a subsequent sha1_pack_name() invocation.  That's not
acceptable, so don't free it.
Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 f78683f3
......@@ -1082,7 +1082,6 @@ struct http_pack_request *new_http_pack_request(
return preq;
abort:
free(filename);
free(preq->url);
free(preq);
return NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册