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;
/* 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)
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;
}