mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
No need to dereference struct proc to pids when comparing processes
for equality. Reviewed by: jhb, pho Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
This commit is contained in:
parent
238b89fcad
commit
1ed2e49b55
1 changed files with 1 additions and 1 deletions
|
|
@ -749,7 +749,7 @@ kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data)
|
|||
|
||||
case PT_ATTACH:
|
||||
/* Self */
|
||||
if (p->p_pid == td->td_proc->p_pid) {
|
||||
if (p == td->td_proc) {
|
||||
error = EINVAL;
|
||||
goto fail;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue