mirror of
https://github.com/opnsense/src.git
synced 2026-04-15 14:29:58 -04: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
1 changed files with 1 additions and 0 deletions
|
|
@ -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 a new issue