diff options
author | dg <dg@FreeBSD.org> | 1997-12-16 15:40:29 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1997-12-16 15:40:29 +0000 |
commit | 78fabc0578bd58e7babd07ec50717b6ccb959ed5 (patch) | |
tree | 48dad4391ccc8b829158f79ea46af75a564c141e /sys/kern/kern_exec.c | |
parent | 65cee4a218c6270094178a0f5f9d458b5847f825 (diff) | |
download | FreeBSD-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.c | 7 |
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); |