diff --git a/sbin/mount_union/mount_union.c b/sbin/mount_union/mount_union.c index fa4d4f052b22..914176f9b0c8 100644 --- a/sbin/mount_union/mount_union.c +++ b/sbin/mount_union/mount_union.c @@ -1,4 +1,4 @@ -/* $NetBSD: mount_union.c,v 1.14 2005/02/05 15:14:25 xtraeme Exp $ */ +/* $NetBSD: mount_union.c,v 1.15 2006/03/17 06:51:00 erh Exp $ */ /* * Copyright (c) 1992, 1993, 1994 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1992, 1993, 1994\n\ #if 0 static char sccsid[] = "@(#)mount_union.c 8.6 (Berkeley) 4/26/95"; #else -__RCSID("$NetBSD: mount_union.c,v 1.14 2005/02/05 15:14:25 xtraeme Exp $"); +__RCSID("$NetBSD: mount_union.c,v 1.15 2006/03/17 06:51:00 erh Exp $"); #endif #endif /* not lint */ @@ -84,6 +84,7 @@ mount_union(int argc, char *argv[]) struct union_args args; int ch, mntflags; char target[MAXPATHLEN], canon_dir[MAXPATHLEN]; + mntoptparse_t pmop; mntflags = 0; @@ -95,7 +96,10 @@ mount_union(int argc, char *argv[]) args.mntflags |= UNMNT_BELOW; break; case 'o': - getmntopts(optarg, mopts, &mntflags, 0); + pmop = getmntopts(optarg, mopts, &mntflags, 0); + if (!pmop) + err(1, "getmntopts"); + freemntopts(pmop); break; case 'r': args.mntflags &= ~UNMNT_OPMASK;