free the URL string if that was allocated
authorDaniel Stenberg <daniel@haxx.se>
Wed, 11 Oct 2000 10:58:37 +0000 (10:58 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 11 Oct 2000 10:58:37 +0000 (10:58 +0000)
lib/url.c

index 822f14e..2cdb0c0 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -235,6 +235,10 @@ void static urlfree(struct UrlData *data, bool totally)
     if(data->free_referer)
       free(data->referer);
 
+    if(data->bits.urlstringalloc)
+      /* the URL is allocated, free it! */
+      free(data->url);
+
     cookie_cleanup(data->cookies);
 
     free(data);