summaryrefslogtreecommitdiff
path: root/image/png.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2012-10-03 19:24:58 +0100
committerVincent Sanders <vince@netsurf-browser.org>2012-10-03 19:26:17 +0100
commitc1671f37b1a6b8872d736bfdcee25770dbbd5a06 (patch)
tree281e072de977044debdee1dc42efebc5f3c533db /image/png.c
parent5a2212fda6332980f351a8d8ca03f7d79d8c9712 (diff)
downloadnetsurf-c1671f37b1a6b8872d736bfdcee25770dbbd5a06.tar.gz
netsurf-c1671f37b1a6b8872d736bfdcee25770dbbd5a06.tar.bz2
reduce talloc usage to box tree layout only
Diffstat (limited to 'image/png.c')
-rw-r--r--image/png.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/image/png.c b/image/png.c
index 829eee272..6f1d926ee 100644
--- a/image/png.c
+++ b/image/png.c
@@ -35,7 +35,6 @@
#include "utils/log.h"
#include "utils/messages.h"
-#include "utils/talloc.h"
#include "utils/utils.h"
/* accommodate for old versions of libpng (beware security holes!) */
@@ -291,20 +290,25 @@ static nserror nspng_create(const content_handler *handler,
nspng_content *png_c;
nserror error;
- png_c = talloc_zero(0, nspng_content);
+ png_c = calloc(1, sizeof(nspng_content));
if (png_c == NULL)
return NSERROR_NOMEM;
- error = content__init(&png_c->base, handler, imime_type, params,
- llcache, fallback_charset, quirks);
+ error = content__init(&png_c->base,
+ handler,
+ imime_type,
+ params,
+ llcache,
+ fallback_charset,
+ quirks);
if (error != NSERROR_OK) {
- talloc_free(png_c);
+ free(png_c);
return error;
}
error = nspng_create_png_data(png_c);
if (error != NSERROR_OK) {
- talloc_free(png_c);
+ free(png_c);
return error;
}
@@ -542,7 +546,7 @@ static nserror nspng_clone(const struct content *old_c, struct content **new_c)
const char *data;
unsigned long size;
- clone_png_c = talloc_zero(0, nspng_content);
+ clone_png_c = calloc(1, sizeof(nspng_content));
if (clone_png_c == NULL)
return NSERROR_NOMEM;