diff options
author | David Hill <dhill@cvs.openbsd.org> | 2006-03-20 19:50:10 +0000 |
---|---|---|
committer | David Hill <dhill@cvs.openbsd.org> | 2006-03-20 19:50:10 +0000 |
commit | c9e0f1dc8cbeafd7ea99d866a2d0583c3587d61c (patch) | |
tree | c619d3ee07c139d78769338c795f6e99ca62bc16 | |
parent | 6d5a842a25aa527c652f7f35a264e45662f1dc56 (diff) |
NetBSD Coverity CID 1745: Fix memory leak.
yes otto@
-rw-r--r-- | sbin/fsck/fsck.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/fsck/fsck.c b/sbin/fsck/fsck.c index 5cad2b8a56f..2407b3359af 100644 --- a/sbin/fsck/fsck.c +++ b/sbin/fsck/fsck.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fsck.c,v 1.23 2005/11/21 14:27:55 millert Exp $ */ +/* $OpenBSD: fsck.c,v 1.24 2006/03/20 19:50:09 dhill Exp $ */ /* $NetBSD: fsck.c,v 1.7 1996/10/03 20:06:30 christos Exp $ */ /* @@ -35,7 +35,7 @@ * */ -static const char rcsid[] = "$OpenBSD: fsck.c,v 1.23 2005/11/21 14:27:55 millert Exp $"; +static const char rcsid[] = "$OpenBSD: fsck.c,v 1.24 2006/03/20 19:50:09 dhill Exp $"; #include <sys/param.h> #include <sys/mount.h> @@ -270,6 +270,7 @@ checkfs(const char *vfstype, const char *spec, const char *mntpt, void *auxarg, warn("fork"); if (optbuf) free(optbuf); + free(argv); return (1); case 0: /* Child. */ @@ -302,6 +303,7 @@ checkfs(const char *vfstype, const char *spec, const char *mntpt, void *auxarg, default: /* Parent. */ if (optbuf) free(optbuf); + free(argv); if (pidp) { *pidp = pid; |