From: Shawn O. Pearce Date: Sat, 17 Apr 2010 20:07:34 GMT Subject: [PATCH v3 01/11] http.c: Remove bad free of static block Message-ID: <1271534864-31944-1-git-send-email-spearce@spearce.org> In-Reply-To: <20100416100307.0000423f@unknown> 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 --- http.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/http.c b/http.c index 4814217..f26625e 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; -- 1.7.1.rc1.269.ga27c7