Code

http.c: free preq when aborting
authorTay Ray Chuan <rctay89@gmail.com>
Mon, 10 Aug 2009 15:55:48 +0000 (23:55 +0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 10 Aug 2009 20:25:25 +0000 (13:25 -0700)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http.c

diff --git a/http.c b/http.c
index a2720d576d72e456b038444050f5b8de9d25d792..cfe32f5f0ead6016dfc521f8256bcf6dad76ad4f 100644 (file)
--- 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;
 }