@matheusbsbs / matheus-bagliano / commits / 03b6aeb274
Fork 0

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: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Shawn O. Pearce committed Apr 17, 2010 at 13:07 UTC 03b6aeb27443f117a3d8375f01bc38baeeff65a5
1 file changed -1
http.c
-1
@@ -1082,7 +1082,6 @@ struct http_pack_request *new_http_pack_request(
1082 return preq;
1083
1084 abort:
1085 - free(filename);
1085 free(preq->url);
1086 free(preq);
1087 return NULL;