http: release the memory of a http pack request as well
authorStefan Beller <sbeller@google.com>
Sat, 21 Mar 2015 00:28:06 +0000 (17:28 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 24 Mar 2015 19:36:10 +0000 (12:36 -0700)
The cleanup function is used in 4 places now and it's always safe to
free up the memory as well.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http.c
diff --git a/http.c b/http.c
index 9c825afefdda70b8f8ccda0b9ed06e5d54333a50..4b179f6fc8f29c1683b187393203d20f95d29157 100644 (file)
--- a/http.c
+++ b/http.c
@@ -1462,6 +1462,7 @@ void release_http_pack_request(struct http_pack_request *preq)
        }
        preq->slot = NULL;
        free(preq->url);
+       free(preq);
 }
 
 int finish_http_pack_request(struct http_pack_request *preq)