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
openzfs#12928 (comment)

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#12954
  • Loading branch information
nabijaczleweli authored and Ryan Moeller committed Feb 2, 2022
1 parent c1700fc commit dd85076
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 dd85076

Please sign in to comment.