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/svg.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/svg.c')
-rw-r--r-- | image/svg.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/image/svg.c b/image/svg.c index 5e21c84c5..971ab764e 100644 --- a/image/svg.c +++ b/image/svg.c @@ -30,7 +30,6 @@ #include "desktop/plotters.h" #include "image/svg.h" #include "utils/messages.h" -#include "utils/talloc.h" #include "utils/utils.h" typedef struct svg_content { @@ -73,20 +72,20 @@ static nserror svg_create(const content_handler *handler, svg_content *svg; nserror error; - svg = talloc_zero(0, svg_content); + svg = calloc(1, sizeof(svg_content)); if (svg == NULL) return NSERROR_NOMEM; error = content__init(&svg->base, handler, imime_type, params, llcache, fallback_charset, quirks); if (error != NSERROR_OK) { - talloc_free(svg); + free(svg); return error; } error = svg_create_svg_data(svg); if (error != NSERROR_OK) { - talloc_free(svg); + free(svg); return error; } @@ -290,7 +289,7 @@ static nserror svg_clone(const struct content *old, struct content **newc) svg_content *svg; nserror error; - svg = talloc_zero(0, svg_content); + svg = calloc(1, sizeof(svg_content)); if (svg == NULL) return NSERROR_NOMEM; |