summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exec.c
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1997-12-16 15:40:29 +0000
committerdg <dg@FreeBSD.org>1997-12-16 15:40:29 +0000
commit78fabc0578bd58e7babd07ec50717b6ccb959ed5 (patch)
tree48dad4391ccc8b829158f79ea46af75a564c141e /sys/kern/kern_exec.c
parent65cee4a218c6270094178a0f5f9d458b5847f825 (diff)
downloadFreeBSD-src-78fabc0578bd58e7babd07ec50717b6ccb959ed5.zip
FreeBSD-src-78fabc0578bd58e7babd07ec50717b6ccb959ed5.tar.gz
Fix bug where a struct buf was free()'d back to the system malloc pool.
Quite amazing that the system runs at all with this bug. Also present in 2.2.5. The bug appears to have come in with changes in rev 1.53. PR: might fix PR#5313 Submitted by: bde
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r--sys/kern/kern_exec.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 4d4f05a..6804d28 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: kern_exec.c,v 1.68 1997/11/06 19:29:08 phk Exp $
+ * $Id: kern_exec.c,v 1.69 1997/12/06 04:11:09 sef Exp $
*/
#include <sys/param.h>
@@ -218,10 +218,9 @@ interpret:
if (bp != NULL) {
brelse(bp);
bp = NULL;
- } else {
+ } else
free((void *)imgp->image_header, M_TEMP);
- imgp->image_header = NULL;
- }
+ imgp->image_header = NULL;
/* free old vnode and name buffer */
vrele(ndp->ni_vp);
zfree(namei_zone, ndp->ni_cnd.cn_pnbuf);
OpenPOWER on IntegriCloud