From 57c70b7385383ef3f991857d324127b52eff610f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Thu, 13 Jan 2022 20:07:54 +0100 Subject: [PATCH] linux: libzfs: mount: fix uninitialised flags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They're later |=d with constants, but never reset Caught by valgrind while investigating https://github.com/openzfs/zfs/pull/12928#issuecomment-1007496550 Reviewed-by: Brian Behlendorf Signed-off-by: Ahelenia ZiemiaƄska Closes #12954 --- lib/libzfs/os/linux/libzfs_mount_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libzfs/os/linux/libzfs_mount_os.c b/lib/libzfs/os/linux/libzfs_mount_os.c index e4fe8181bd1b..1b01caeb7079 100644 --- a/lib/libzfs/os/linux/libzfs_mount_os.c +++ b/lib/libzfs/os/linux/libzfs_mount_os.c @@ -327,7 +327,7 @@ do_mount(zfs_handle_t *zhp, const char *mntpt, char *opts, int flags) if (!libzfs_envvar_is_set("ZFS_MOUNT_HELPER")) { char badopt[MNT_LINE_MAX] = {0}; - unsigned long mntflags = flags, zfsflags; + unsigned long mntflags = flags, zfsflags = 0; char myopts[MNT_LINE_MAX] = {0}; if (zfs_parse_mount_options(opts, &mntflags,