From 97de2aae497a28070058c5fe6a465f4b8847761d Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 20 Oct 2009 12:02:57 +0200 Subject: [PATCH] Fix double xmlFree - occurred for XSLT failure --- src/normalize_record.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/normalize_record.c b/src/normalize_record.c index 322566e..dfca8bb 100644 --- a/src/normalize_record.c +++ b/src/normalize_record.c @@ -137,17 +137,17 @@ int normalize_record_transform(normalize_record_t nt, xmlDoc **doc, { new = marcmap_apply(m->marcmap, *doc); } - + root = xmlDocGetRootElement(new); + xmlFreeDoc(*doc); if (!new || !root || !root->children) { if (new) xmlFreeDoc(new); - xmlFreeDoc(*doc); + *doc = 0; return -1; } - xmlFreeDoc(*doc); *doc = new; } } -- 1.7.10.4