]> wimlib.net Git - wimlib/blobdiff - src/update_image.c
New format for UNIX data
[wimlib] / src / update_image.c
index cda3797d53350f36c3cfc84c1155ee591c508847..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)
@@ -1266,7 +1268,7 @@ check_add_command(struct wimlib_update_command *cmd,
 
        if (!is_entire_image) {
                if (add_flags & WIMLIB_ADD_FLAG_NTFS) {
-                       ERROR("Cannot add directly from a NTFS volume "
+                       ERROR("Cannot add directly from an NTFS volume "
                              "when not capturing a full image!");
                        return WIMLIB_ERR_INVALID_PARAM;
                }