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/gif.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'image/gif.c') diff --git a/image/gif.c b/image/gif.c index d92eede85..b3781f837 100644 --- a/image/gif.c +++ b/image/gif.c @@ -45,7 +45,6 @@ #include "utils/log.h" #include "utils/messages.h" #include "utils/schedule.h" -#include "utils/talloc.h" #include "utils/utils.h" typedef struct nsgif_content { @@ -105,20 +104,20 @@ static nserror nsgif_create(const content_handler *handler, nsgif_content *result; nserror error; - result = talloc_zero(0, nsgif_content); + result = calloc(1, sizeof(nsgif_content)); if (result == NULL) return NSERROR_NOMEM; error = content__init(&result->base, handler, imime_type, params, llcache, fallback_charset, quirks); if (error != NSERROR_OK) { - talloc_free(result); + free(result); return error; } error = nsgif_create_gif_data(result); if (error != NSERROR_OK) { - talloc_free(result); + free(result); return error; } @@ -367,7 +366,7 @@ static nserror nsgif_clone(const struct content *old, struct content **newc) nsgif_content *gif; nserror error; - gif = talloc_zero(0, nsgif_content); + gif = calloc(1, sizeof(nsgif_content)); if (gif == NULL) return NSERROR_NOMEM; -- cgit v1.2.3