yaz-marcdump: fix leaks for MARCXML parsing YAZ-694
[yaz-moved-to-github.git] / util / yaz-xmlquery.c
index 31579e3..34fefd2 100644 (file)
@@ -1,7 +1,10 @@
 /* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2008 Index Data
+ * Copyright (C) 1995-2013 Index Data
  * See the file LICENSE for details.
  */
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <stdlib.h>
 #include <stdio.h>
@@ -49,9 +52,9 @@ void pqftoxmlquery(const char *pqf)
     else
     {
        xmlDocPtr doc = 0;
-       
+
         yaz_rpnquery2xml(rpn, &doc);
-        
+
         if (!doc)
        {
            fprintf(stderr, "%s: yaz_rpnquery2xml failed for query %s\n",
@@ -81,7 +84,7 @@ void pqftoxmlquery(const char *pqf)
            }
             xmlFreeDoc(doc);
        }
-    }    
+    }
     odr_destroy(odr);
 }
 
@@ -159,7 +162,7 @@ void xmlfiletopqf(const char *xmlfile)
        fprintf(stderr, "%s: close failed for file %s\n", prog, xmlfile);
        exit(1);
     }
-    
+
     xmlquerytopqf(xmlstr);
     xfree(xmlstr);
 }