diff --git a/lib/url.c b/lib/url.c index 822f14e128..2cdb0c06e0 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);