From c1671f37b1a6b8872d736bfdcee25770dbbd5a06 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 3 Oct 2012 19:24:58 +0100 Subject: reduce talloc usage to box tree layout only --- image/jpeg.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'image/jpeg.c') 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; -- cgit v1.2.3