aboutsummaryrefslogtreecommitdiffstats
path: root/sbin/geom/misc
diff options
context:
space:
mode:
authorAndrey V. Elsukov <ae@FreeBSD.org>2010-06-07 07:41:41 +0000
committerAndrey V. Elsukov <ae@FreeBSD.org>2010-06-07 07:41:41 +0000
commit24609c49caf27c91df87599a3fb677153737edb1 (patch)
tree461a7fd8c5c461ba9a4b31ef237a2e56884d09bf /sbin/geom/misc
parent5995fb97d98de0dcf3f7849f3cd29d7a0444bd07 (diff)
downloadsrc-24609c49caf27c91df87599a3fb677153737edb1.tar.gz
src-24609c49caf27c91df87599a3fb677153737edb1.zip
bgeom(3) does strdup of param name.
Don't leak memory when deleting param from gctl_req. Reviewed by: marcel Approved by: mav (mentor) MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=208886
Diffstat (limited to 'sbin/geom/misc')
-rw-r--r--sbin/geom/misc/subr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sbin/geom/misc/subr.c b/sbin/geom/misc/subr.c
index 21deac8bf52e..e71ec7489b0c 100644
--- a/sbin/geom/misc/subr.c
+++ b/sbin/geom/misc/subr.c
@@ -436,6 +436,7 @@ gctl_delete_param(struct gctl_req *req, const char *name)
if (i == req->narg)
return (ENOENT);
+ free(ap->name);
req->narg--;
while (i < req->narg) {
req->arg[i] = req->arg[i + 1];