summaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authorJulian Phillips <julian@quantumfyre.co.uk>2007-04-29 03:46:42 +0100
committerJunio C Hamano <junkio@cox.net>2007-04-29 01:34:59 -0700
commite9d54bd18bcf5dc9eb68eb1cba9a6a7ba3f71fd6 (patch)
tree4cd857842e31d6cdde33fe03ae6c34e3e92b70be /http.c
parent4e58bf970bfddb8106541d98c3321fdf2a6ba23b (diff)
downloadgit-e9d54bd18bcf5dc9eb68eb1cba9a6a7ba3f71fd6.tar.gz
http.c: Fix problem with repeated calls of http_init
Calling http_init after calling http_cleanup causes a segfault. This is due to the pragma_header curl_slist being freed but not being set to NULL. The subsequent call to http_init tries to setup the slist again, but it now points to an invalid memory location. Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'http.c')
-rw-r--r--http.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/http.c b/http.c
index 576740feff..ae27e0c940 100644
--- a/http.c
+++ b/http.c
@@ -300,6 +300,7 @@ void http_cleanup(void)
curl_global_cleanup();
curl_slist_free_all(pragma_header);
+ pragma_header = NULL;
}
struct active_request_slot *get_active_slot(void)