]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: (mount) free hook data if new APi not avalable
authorKarel Zak <kzak@redhat.com>
Wed, 26 Apr 2023 09:02:03 +0000 (11:02 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 26 Apr 2023 09:02:03 +0000 (11:02 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/hook_mount.c
libmount/src/hook_subdir.c

index 9d1ffaf0d157688f2a64569ab0fee75508c29b49..a324637cb73e5260ac06704f82ec14b82c852a8b 100644 (file)
@@ -643,6 +643,7 @@ static int hook_prepare(struct libmnt_context *cxt,
                        /* we need to recover from this error, so hook_mount_legacy.c
                         * can try to continue */
                        reset_syscall_status(cxt);
+                       free_hookset_data(cxt, hs);
                        return 1;
                }
        }
index 85b39465cd373f7f2805827d9a10172e1d3917f8..aee0baf3392cd7789b0527eae5b0cae5344ea0c3 100644 (file)
@@ -269,6 +269,9 @@ static int hook_mount_pre(
                rc = mnt_context_append_hook(cxt, hs,
                                MNT_STAGE_MOUNT_POST,
                                NULL, hook_mount_post);
+
+       DBG(HOOK, ul_debugobj(hs, "unshared tmp target %s [rc=%d]",
+                               MNT_PATH_TMPTGT, rc));
        return rc;
 }