svn commit: r235080 - head/sys/geom/raid
Alexander Motin
mav at FreeBSD.org
Sun May 6 12:55:21 UTC 2012
Author: mav
Date: Sun May 6 12:55:20 2012
New Revision: 235080
URL: http://svn.freebsd.org/changeset/base/235080
Log:
Plug small memory leaks.
Modified:
head/sys/geom/raid/md_ddf.c
head/sys/geom/raid/md_promise.c
Modified: head/sys/geom/raid/md_ddf.c
==============================================================================
--- head/sys/geom/raid/md_ddf.c Sun May 6 11:48:37 2012 (r235079)
+++ head/sys/geom/raid/md_ddf.c Sun May 6 12:55:20 2012 (r235080)
@@ -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_
mdi->mdio_starting--;
callout_stop(&pv->pv_start_co);
}
+ free(pv, M_MD_DDF);
+ vol->v_md_data = NULL;
return (0);
}
Modified: head/sys/geom/raid/md_promise.c
==============================================================================
--- head/sys/geom/raid/md_promise.c Sun May 6 11:48:37 2012 (r235079)
+++ head/sys/geom/raid/md_promise.c Sun May 6 12:55:20 2012 (r235080)
@@ -1955,6 +1955,8 @@ g_raid_md_free_volume_promise(struct g_r
pv->pv_started = 1;
callout_stop(&pv->pv_start_co);
}
+ free(pv, M_MD_PROMISE);
+ vol->v_md_data = NULL;
return (0);
}
More information about the svn-src-head
mailing list