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/bmp.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'image/bmp.c') diff --git a/image/bmp.c b/image/bmp.c index aea6d26fc..9ca86fd82 100644 --- a/image/bmp.c +++ b/image/bmp.c @@ -33,7 +33,6 @@ #include "desktop/plotters.h" #include "utils/log.h" #include "utils/messages.h" -#include "utils/talloc.h" #include "utils/utils.h" #include "image/bitmap.h" @@ -72,20 +71,20 @@ static nserror nsbmp_create(const content_handler *handler, nsbmp_content *bmp; nserror error; - bmp = talloc_zero(0, nsbmp_content); + bmp = calloc(1, sizeof(nsbmp_content)); if (bmp == NULL) return NSERROR_NOMEM; error = content__init(&bmp->base, handler, imime_type, params, llcache, fallback_charset, quirks); if (error != NSERROR_OK) { - talloc_free(bmp); + free(bmp); return error; } error = nsbmp_create_bmp_data(bmp); if (error != NSERROR_OK) { - talloc_free(bmp); + free(bmp); return error; } @@ -214,7 +213,7 @@ static nserror nsbmp_clone(const struct content *old, struct content **newc) nsbmp_content *new_bmp; nserror error; - new_bmp = talloc_zero(0, nsbmp_content); + new_bmp = calloc(1, sizeof(nsbmp_content)); if (new_bmp == NULL) return NSERROR_NOMEM; -- cgit v1.2.3