bin/158431: commit references a PR
dfilter service
dfilter at FreeBSD.ORG
Wed Aug 3 10:00:31 UTC 2011
The following reply was made to PR bin/158431; it has been noted by GNATS.
From: dfilter at FreeBSD.ORG (dfilter service)
To: bug-followup at FreeBSD.org
Cc:
Subject: Re: bin/158431: commit references a PR
Date: Wed, 3 Aug 2011 09:56:08 +0000 (UTC)
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);
}
_______________________________________________
svn-src-all at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe at freebsd.org"
More information about the freebsd-bugs
mailing list