threads / patch / 20523

patch, 3 partshttp.c: free preq when aborting

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

## tl;dr

One message between Aug 10, 2009 and Aug 10, 2009. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Tay Ray Chuan· Aug 10, 2009, 15:51 UTC · lore

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(-)
Show changes to http.c +1 −1
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

← back to recent threads