diff options
author | pjd <pjd@FreeBSD.org> | 2005-03-16 20:48:13 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2005-03-16 20:48:13 +0000 |
commit | 84f16c193ca3d9104083b4fd617f6682db5a5475 (patch) | |
tree | ded18633f3cca2c821b980b2fdf3d389cc95a726 /sys/geom/geom_bsd.c | |
parent | edeb9d81b0e10ba912c5810a921d024c302a527d (diff) | |
download | FreeBSD-src-84f16c193ca3d9104083b4fd617f6682db5a5475.zip FreeBSD-src-84f16c193ca3d9104083b4fd617f6682db5a5475.tar.gz |
Plug memory leak.
Submitted by: Ted Unangst
Found by: Coverity Prevent analysis tool
Approved by: phk
MFC after: 3 days
Diffstat (limited to 'sys/geom/geom_bsd.c')
-rw-r--r-- | sys/geom/geom_bsd.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/geom/geom_bsd.c b/sys/geom/geom_bsd.c index e4834a3..6b2220d 100644 --- a/sys/geom/geom_bsd.c +++ b/sys/geom/geom_bsd.c @@ -372,10 +372,9 @@ g_bsd_ioctl(struct g_provider *pp, u_long cmd, void *data, int fflag, struct thr } case DIOCSDINFO: case DIOCWDINFO: { - label = g_malloc(LABELSIZE, M_WAITOK); - if (!(fflag & FWRITE)) return (EPERM); + label = g_malloc(LABELSIZE, M_WAITOK); /* The disklabel to set is the ioctl argument. */ bsd_disklabel_le_enc(label, data); |