[project @ 2003-10-08 20:49:26 by bursa]

Plug memory leaks.

svn path=/import/netsurf/; revision=353
This commit is contained in:
James Bursa 2003-10-08 20:49:26 +00:00
parent 16746b0151
commit 43736de996
3 changed files with 4 additions and 1 deletions

View File

@ -292,6 +292,7 @@ void content_destroy(struct content *c)
xfree(user);
}
free(c->mime_type);
xfree(c->url);
xfree(c);
}

View File

@ -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);
}
}

View File

@ -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);