From e9d54bd18bcf5dc9eb68eb1cba9a6a7ba3f71fd6 Mon Sep 17 00:00:00 2001 From: Julian Phillips Date: Sun, 29 Apr 2007 03:46:42 +0100 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- http.c | 1 + 1 file changed, 1 insertion(+) diff --git a/http.c b/http.c index 576740fef..ae27e0c94 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) -- 2.30.2