Fixed memory init problem for mod_dom in show records mode.
authorunknown <adam@.(none)>
Thu, 6 Nov 2008 17:03:59 +0000 (18:03 +0100)
committerunknown <adam@.(none)>
Thu, 6 Nov 2008 17:03:59 +0000 (18:03 +0100)
index/mod_dom.c

index 7ade71d..f16fba7 100644 (file)
@@ -1179,15 +1179,13 @@ static int convert_extract_doc(struct filter_info *tinfo,
     {
         xmlChar *buf_out;
         int len_out;
+        xmlDocDumpMemory(doc, &buf_out, &len_out);
 #if 0 
         FILE *outf = fopen("extract.xml", "w");
-        xmlDocDumpMemory(doc, &buf_out, &len_out);
         fwrite(buf_out, 1, len_out, outf);
-#endif
-        yaz_log(YLOG_LOG, "Extract Doc: %.*s", len_out, buf_out);
-#if 0
         fclose(outf);
 #endif
+        yaz_log(YLOG_LOG, "Extract Doc: %.*s", len_out, buf_out);
     }
 
     if (p->setStoreData)