From: Shawn O. Pearce Date: Sat, 17 Apr 2010 20:07:34 +0000 (-0700) Subject: http.c: Remove bad free of static block X-Git-Tag: v1.7.2-rc0~118^2~11 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=03b6aeb27443f117a3d8375f01bc38baeeff65a5;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/http.c b/http.c index deab59551..9526491a4 100644 --- a/http.c +++ b/http.c @@ -1082,7 +1082,6 @@ struct http_pack_request *new_http_pack_request( return preq; abort: - free(filename); free(preq->url); free(preq); return NULL;