]> wimlib.net Git - wimlib/blobdiff - src/update_image.c
wimlib_iterate_dir_tree(): iterate in default case order
[wimlib] / src / update_image.c
index facdfff202ed4f702cad097a10155690ad2d404e..b973c21d8a896ac1d4b28ba570f9bf197c144fb3 100644 (file)
 #  include "config.h"
 #endif
 
+#include <errno.h>
+#include <string.h>
+#include <sys/stat.h>
+
+#include "wimlib/alloca.h"
+#include "wimlib/assert.h"
 #include "wimlib/capture.h"
 #include "wimlib/dentry.h"
 #include "wimlib/encoding.h"
 #include "wimlib/progress.h"
 #include "wimlib/xml.h"
 
-#include <errno.h>
-#include <sys/stat.h>
-#include <stdlib.h>
-
-#ifdef HAVE_ALLOCA_H
-#  include <alloca.h>
-#endif
-
 /* Saved specification of a "primitive" update operation that was performed.  */
 struct update_primitive {
        enum {
@@ -534,7 +532,7 @@ handle_conflict(struct wim_dentry *branch, struct wim_dentry *existing,
                                return ret;
                        }
                }
-               free_dentry(branch);
+               free_dentry_tree(branch, j->lookup_table);
                return 0;
        } else if (add_flags & WIMLIB_ADD_FLAG_NO_REPLACE) {
                /* Can't replace nondirectory file  */