mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
fix a serious bug in libproc's proc_attach
proc_attach always frees any struct proc_handle data that it allocates, but that is supposed to be done only in error conditions. PR: bin/158431 Approved by: re (kib) MFC after: 1 week
This commit is contained in:
parent
52227d94df
commit
a8375da0d3
1 changed files with 1 additions and 2 deletions
|
|
@ -79,12 +79,11 @@ proc_attach(pid_t pid, int flags, struct proc_handle **pphdl)
|
|||
else
|
||||
phdl->status = PS_STOP;
|
||||
|
||||
out:
|
||||
if (error)
|
||||
proc_free(phdl);
|
||||
else
|
||||
*pphdl = phdl;
|
||||
out:
|
||||
proc_free(phdl);
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue