git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/3] http.c: free preq when aborting

From
Tay Ray Chuan <rctay89@gmail.com>
Date
Aug 10, 2009, 15:51 UTC
Message-ID
<20090810235124.e978869f.rctay89@gmail.com>

Free preq in new_http_pack_request when aborting. preq was allocated before jumping to the 'abort' label so this is safe.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
---
 http.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/http.c b/http.c
index a2720d5..cfe32f5 100644
--- a/http.c
+++ b/http.c
@@ -1059,6 +1059,7 @@ struct http_pack_request *new_http_pack_request(

 abort:
 	free(filename);
+	free(preq);
 	return NULL;
 }

--
1.6.3.1
Message 1 of 1 in “http.c: free preq when aborting”
  1. 1/3 http.c: free preq when abortingTay Ray Chuan, Aug 10, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.