diff options
Diffstat (limited to 'content')
-rw-r--r-- | content/content.c | 1 | ||||
-rw-r--r-- | content/fetch.c | 2 | ||||
-rw-r--r-- | content/fetchcache.c | 2 |
3 files changed, 4 insertions, 1 deletions
diff --git a/content/content.c b/content/content.c index 7489d1838..280364b9d 100644 --- a/content/content.c +++ b/content/content.c @@ -292,6 +292,7 @@ void content_destroy(struct content *c) xfree(user); } free(c->mime_type); + xfree(c->url); xfree(c); } diff --git a/content/fetch.c b/content/fetch.c index 4086b2ff5..2823d6dfa 100644 --- a/content/fetch.c +++ b/content/fetch.c @@ -502,7 +502,7 @@ bool fetch_process_headers(struct fetch *f) char *url_path; url_path = curl_unescape(f->url + 8, (int) strlen(f->url) - 8); type = fetch_filetype(url_path); - free(url_path); + curl_free(url_path); } } diff --git a/content/fetchcache.c b/content/fetchcache.c index 84ba57bda..cf5bccf47 100644 --- a/content/fetchcache.c +++ b/content/fetchcache.c @@ -56,6 +56,7 @@ struct content * fetchcache(const char *url0, char *referer, c = cache_get(url); if (c != 0) { + free(url); content_add_user(c, callback, p1, p2); return c; } @@ -67,6 +68,7 @@ struct content * fetchcache(const char *url0, char *referer, c->width = width; c->height = height; c->fetch = fetch_start(url, referer, fetchcache_callback, c, only_2xx); + free(url); if (c->fetch == 0) { LOG(("warning: fetch_start failed")); cache_destroy(c); |