]> granicus.if.org Git - curl/commitdiff
prevent memory leak when going out of memory
authorDaniel Stenberg <daniel@haxx.se>
Thu, 14 Aug 2003 14:20:03 +0000 (14:20 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 14 Aug 2003 14:20:03 +0000 (14:20 +0000)
lib/url.c

index 76331aac9a716aecb01f2e462c6a6b96b223d0c3..588391524b48e40236b33903e94dde256dc4a8a0 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -321,6 +321,7 @@ CURLcode Curl_open(struct SessionHandle **curl)
     malloc(sizeof(struct connectdata *) * data->state.numconnects);
 
   if(!data->state.connects) {
+    free(data->state.headerbuff);
     free(data);
     return CURLE_OUT_OF_MEMORY;
   }