summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2003-10-08 20:49:26 +0000
committerJames Bursa <james@netsurf-browser.org>2003-10-08 20:49:26 +0000
commit43736de9961a500f803c947c4ca1c23c5f3d0455 (patch)
tree6f3e33e6001e90160075d21c0cc1c87493a2e4ed /content
parent16746b0151b6623c8d1403acc1f84036758ac2ae (diff)
downloadnetsurf-43736de9961a500f803c947c4ca1c23c5f3d0455.tar.gz
netsurf-43736de9961a500f803c947c4ca1c23c5f3d0455.tar.bz2
[project @ 2003-10-08 20:49:26 by bursa]
Plug memory leaks. svn path=/import/netsurf/; revision=353
Diffstat (limited to 'content')
-rw-r--r--content/content.c1
-rw-r--r--content/fetch.c2
-rw-r--r--content/fetchcache.c2
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);