]> wimlib.net Git - wimlib/blobdiff - src/update_image.c
New format for UNIX data
[wimlib] / src / update_image.c
index 14f316366c74951939660366cf3c07d715fcf282..6779a127b7997aa0b162ecfc6ee54cbdeb37e701 100644 (file)
@@ -401,8 +401,10 @@ journaled_change_name(struct update_command_journal *j,
        prim.name.subject = dentry;
        prim.name.old_name = dentry->file_name;
        ret = record_update_primitive(j, prim);
-       if (ret)
+       if (ret) {
+               FREE(new_name);
                return ret;
+       }
 
        dentry->file_name = new_name;
        dentry->file_name_nbytes = new_name_nbytes;
@@ -917,7 +919,7 @@ free_dentry_full_path(struct wim_dentry *dentry, void *_ignore)
 
 /* Is @d1 a (possibly nonproper) ancestor of @d2?  */
 static bool
-is_ancestor(struct wim_dentry *d1, struct wim_dentry *d2)
+is_ancestor(const struct wim_dentry *d1, const struct wim_dentry *d2)
 {
        for (;;) {
                if (d2 == d1)