]> wimlib.net Git - wimlib/blobdiff - src/xml.c
xml.c: Use xmlFree() for memory allocated by libxml2
[wimlib] / src / xml.c
index 4617e2ab4cbd6fa8a3e1bec379ccb33e6e1fcfd7..382500597164321ec3e0b5e172c58a811d5131ce 100644 (file)
--- a/src/xml.c
+++ b/src/xml.c
@@ -25,6 +25,7 @@
 #  include "config.h"
 #endif
 
+#include "wimlib/assert.h"
 #include "wimlib/dentry.h"
 #include "wimlib/encoding.h"
 #include "wimlib/error.h"
@@ -490,7 +491,7 @@ xml_read_image_info(xmlNode *image_node, struct image_info *image_info)
        index_prop = xmlGetProp(image_node, "INDEX");
        if (index_prop) {
                image_info->index = atoi(index_prop);
-               FREE(index_prop);
+               xmlFree(index_prop);
        } else {
                image_info->index = 1;
        }
@@ -1261,7 +1262,7 @@ xml_update_image_info(WIMStruct *wim, int image)
        for_dentry_in_tree(wim->image_metadata[image - 1]->root_dentry,
                           calculate_dentry_statistics,
                           image_info);
-       image_info->last_modification_time = get_wim_timestamp();
+       image_info->last_modification_time = now_as_wim_timestamp();
 }
 
 /* Adds an image to the XML information. */
@@ -1292,7 +1293,7 @@ xml_add_image(WIMStruct *wim, const tchar *name)
 
        wim->wim_info = wim_info;
        image_info->index = wim_info->num_images;
-       image_info->creation_time = get_wim_timestamp();
+       image_info->creation_time = now_as_wim_timestamp();
        xml_update_image_info(wim, image_info->index);
        return 0;