]> wimlib.net Git - wimlib/blobdiff - src/update_image.c
winnt_openat(): Use FILE_SHARE_VALID_FLAGS
[wimlib] / src / update_image.c
index cda3797d53350f36c3cfc84c1155ee591c508847..af784f99588f36878469388ae5973386510d72bc 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;
@@ -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;
                }