From: Adam Dickmeiss Date: Tue, 20 Oct 2009 10:02:57 +0000 (+0200) Subject: Fix double xmlFree - occurred for XSLT failure X-Git-Tag: v1.2.3~13 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=97de2aae497a28070058c5fe6a465f4b8847761d;p=pazpar2-moved-to-github.git Fix double xmlFree - occurred for XSLT failure --- 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; } }