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)

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
  • Loading branch information
nabijaczleweli committed Jan 10, 2022
1 parent d6c1bbd commit fcda68c
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 fcda68c

Please sign in to comment.