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
This commit is contained in:
Andrey V. Elsukov 2010-06-07 07:41:41 +00:00
parent 5995fb97d9
commit 24609c49ca
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=208886

View File

@ -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];