diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2012-10-03 19:24:58 +0100 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2012-10-03 19:26:17 +0100 |
commit | c1671f37b1a6b8872d736bfdcee25770dbbd5a06 (patch) | |
tree | 281e072de977044debdee1dc42efebc5f3c533db /image/jpeg.c | |
parent | 5a2212fda6332980f351a8d8ca03f7d79d8c9712 (diff) | |
download | netsurf-c1671f37b1a6b8872d736bfdcee25770dbbd5a06.tar.gz netsurf-c1671f37b1a6b8872d736bfdcee25770dbbd5a06.tar.bz2 |
reduce talloc usage to box tree layout only
Diffstat (limited to 'image/jpeg.c')
-rw-r--r-- | image/jpeg.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/image/jpeg.c b/image/jpeg.c index 27d79bb11..82fde0dd1 100644 --- a/image/jpeg.c +++ b/image/jpeg.c @@ -35,7 +35,6 @@ #include "utils/log.h" #include "utils/messages.h" -#include "utils/talloc.h" #include "utils/types.h" #include "utils/utils.h" @@ -72,14 +71,14 @@ static nserror nsjpeg_create(const content_handler *handler, struct content *jpeg; nserror error; - jpeg = talloc_zero(0, struct content); + jpeg = calloc(1, sizeof(struct content)); if (jpeg == NULL) return NSERROR_NOMEM; error = content__init(jpeg, handler, imime_type, params, llcache, fallback_charset, quirks); if (error != NSERROR_OK) { - talloc_free(jpeg); + free(jpeg); return error; } @@ -347,7 +346,7 @@ static nserror nsjpeg_clone(const struct content *old, struct content **newc) struct content *jpeg_c; nserror error; - jpeg_c = talloc_zero(0, struct content); + jpeg_c = calloc(1, sizeof(struct content)); if (jpeg_c == NULL) return NSERROR_NOMEM; |