mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 21:09:28 +00:00
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:
parent
5995fb97d9
commit
24609c49ca
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=208886
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user