From 1cf9b83c6d2f40fd6c64d2b66039dcfcca5b73f6 Mon Sep 17 00:00:00 2001 From: Ulf Lilleengen Date: Tue, 18 Mar 2008 08:48:51 +0000 Subject: [PATCH] - Fix a memory leak when re-discovering a gvinum configuration. Approved by: pjd (mentor) MFC after: 1 week --- sys/geom/vinum/geom_vinum_drive.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/geom/vinum/geom_vinum_drive.c b/sys/geom/vinum/geom_vinum_drive.c index 60583daa3476..237d55ec378a 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 {