summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2000-10-11 10:58:37 +0000
committerDaniel Stenberg <daniel@haxx.se>2000-10-11 10:58:37 +0000
commit7717212912e4fa05761809b215467c39036843bb (patch)
treecac0d7f22d77bea671ed3c4cbf0489732f559371
parentccb2b5d22cbecce7f8d908e97c7e178865e6034b (diff)
downloadgnurl-7717212912e4fa05761809b215467c39036843bb.tar.gz
gnurl-7717212912e4fa05761809b215467c39036843bb.tar.bz2
gnurl-7717212912e4fa05761809b215467c39036843bb.zip
free the URL string if that was allocated
-rw-r--r--lib/url.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index 822f14e12..2cdb0c06e 100644
--- 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);