svn commit: r224632 - head/lib/libproc
Andriy Gapon
avg at FreeBSD.org
Wed Aug 3 09:56:00 UTC 2011
Author: avg
Date: Wed Aug 3 09:55:59 2011
New Revision: 224632
URL: http://svn.freebsd.org/changeset/base/224632
Log:
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
Modified:
head/lib/libproc/proc_create.c
Modified: head/lib/libproc/proc_create.c
==============================================================================
--- head/lib/libproc/proc_create.c Wed Aug 3 09:42:48 2011 (r224631)
+++ head/lib/libproc/proc_create.c Wed Aug 3 09:55:59 2011 (r224632)
@@ -79,12 +79,11 @@ proc_attach(pid_t pid, int flags, struct
else
phdl->status = PS_STOP;
+out:
if (error)
proc_free(phdl);
else
*pphdl = phdl;
-out:
- proc_free(phdl);
return (error);
}
More information about the svn-src-head
mailing list