aboutsummaryrefslogtreecommitdiff
path: root/util-linux/umount.c
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux/umount.c')
-rw-r--r--util-linux/umount.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util-linux/umount.c b/util-linux/umount.c
index 901c9094f..5b22bfacc 100644
--- a/util-linux/umount.c
+++ b/util-linux/umount.c
@@ -73,9 +73,9 @@ int umount_main(int argc UNUSED_PARAM, char **argv)
} else {
while (getmntent_r(fp, &me, path, PATH_MAX)) {
/* Match fstype if passed */
- if (fstype && match_fstype(&me, fstype))
+ if (!match_fstype(&me, fstype))
continue;
- m = xmalloc(sizeof(struct mtab_list));
+ m = xzalloc(sizeof(*m));
m->next = mtl;
m->device = xstrdup(me.mnt_fsname);
m->dir = xstrdup(me.mnt_dir);