Skip to content

Commit

Permalink
linux: libzfs: mount: fix uninitialised flags
Browse files Browse the repository at this point in the history
They're later |=d with constants, but never reset

Caught by valgrind while investigating
#12928 (comment)

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12954
  • Loading branch information
nabijaczleweli authored Jan 13, 2022
1 parent 8361369 commit 4737a9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/libzfs/os/linux/libzfs_mount_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4737a9e

Please sign in to comment.