summaryrefslogtreecommitdiffstats
path: root/sys/geom/vinum
diff options
context:
space:
mode:
authorlulf <lulf@FreeBSD.org>2008-03-18 08:48:51 +0000
committerlulf <lulf@FreeBSD.org>2008-03-18 08:48:51 +0000
commit8a5c25a52b4bfaf0b0e5f91da4cf5985d5ed4a0c (patch)
treedadb9b70b30b796de2003900e40dda0da8a412a3 /sys/geom/vinum
parent63f525812cee08ddad6461a0acdb49f9ea31ef2f (diff)
downloadFreeBSD-src-8a5c25a52b4bfaf0b0e5f91da4cf5985d5ed4a0c.zip
FreeBSD-src-8a5c25a52b4bfaf0b0e5f91da4cf5985d5ed4a0c.tar.gz
- Fix a memory leak when re-discovering a gvinum configuration.
Approved by: pjd (mentor) MFC after: 1 week
Diffstat (limited to 'sys/geom/vinum')
-rw-r--r--sys/geom/vinum/geom_vinum_drive.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/geom/vinum/geom_vinum_drive.c b/sys/geom/vinum/geom_vinum_drive.c
index 60583da..237d55e 100644
--- a/sys/geom/vinum/geom_vinum_drive.c
+++ b/sys/geom/vinum/geom_vinum_drive.c
@@ -469,9 +469,11 @@ gv_drive_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
/* Check if this drive already has a geom. */
if (d->geom != NULL) {
g_topology_unlock();
+ g_free(vhdr);
break;
}
bcopy(vhdr, d->hdr, sizeof(*vhdr));
+ g_free(vhdr);
/* This is a new drive. */
} else {
OpenPOWER on IntegriCloud