summaryrefslogtreecommitdiffstats
path: root/sys/geom/raid
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2012-05-06 12:55:20 +0000
committermav <mav@FreeBSD.org>2012-05-06 12:55:20 +0000
commit6710f450f7a9e9efe9980ca61ce3d87b66627ea4 (patch)
tree3f44e1fc2a158606f72969ed04a5071b93c4db28 /sys/geom/raid
parent9a3b66f310897ac5d572ba3892d80b0b141f522f (diff)
downloadFreeBSD-src-6710f450f7a9e9efe9980ca61ce3d87b66627ea4.zip
FreeBSD-src-6710f450f7a9e9efe9980ca61ce3d87b66627ea4.tar.gz
Plug small memory leaks.
Diffstat (limited to 'sys/geom/raid')
-rw-r--r--sys/geom/raid/md_ddf.c4
-rw-r--r--sys/geom/raid/md_promise.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/sys/geom/raid/md_ddf.c b/sys/geom/raid/md_ddf.c
index 7d3bdae..f8752f3 100644
--- a/sys/geom/raid/md_ddf.c
+++ b/sys/geom/raid/md_ddf.c
@@ -1228,7 +1228,7 @@ hdrerror:
}
done:
- free(abuf, M_MD_DDF);
+ g_free(abuf);
if (error != 0)
ddf_meta_free(meta);
return (error);
@@ -3039,6 +3039,8 @@ g_raid_md_free_volume_ddf(struct g_raid_md_object *md,
mdi->mdio_starting--;
callout_stop(&pv->pv_start_co);
}
+ free(pv, M_MD_DDF);
+ vol->v_md_data = NULL;
return (0);
}
diff --git a/sys/geom/raid/md_promise.c b/sys/geom/raid/md_promise.c
index 58ebbdd..1c93389 100644
--- a/sys/geom/raid/md_promise.c
+++ b/sys/geom/raid/md_promise.c
@@ -1955,6 +1955,8 @@ g_raid_md_free_volume_promise(struct g_raid_md_object *md,
pv->pv_started = 1;
callout_stop(&pv->pv_start_co);
}
+ free(pv, M_MD_PROMISE);
+ vol->v_md_data = NULL;
return (0);
}
OpenPOWER on IntegriCloud