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
@ -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 New Issue
Block a user