diff options
| author | cgd <cgd@NetBSD.org> | 1994-04-29 08:35:29 +0000 |
|---|---|---|
| committer | cgd <cgd@NetBSD.org> | 1994-04-29 08:35:29 +0000 |
| commit | 531f171602705893cebf46b0484bf06870e6815c (patch) | |
| tree | 5b695f77105e6df51a1ce8f469c1894a983e06ca /sys/kern/exec_script.c | |
| parent | 06a4a02877df3db8a67d728efd6fc83c8e392764 (diff) | |
kill an FDSCRIPTS bug which nobody had found yet.
Diffstat (limited to 'sys/kern/exec_script.c')
| -rw-r--r-- | sys/kern/exec_script.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/exec_script.c b/sys/kern/exec_script.c index 2ebfccc08b9..347904bffa9 100644 --- a/sys/kern/exec_script.c +++ b/sys/kern/exec_script.c @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: exec_script.c,v 1.4 1994/02/16 01:21:00 cgd Exp $ + * $Id: exec_script.c,v 1.5 1994/04/29 08:35:29 cgd Exp $ */ #if defined(SETUIDSCRIPTS) && !defined(FDSCRIPTS) @@ -257,6 +257,8 @@ check_shell: return (0); } + /* XXX oldpnbuf not set for "goto fail" path */ + epp->ep_ndp->ni_pnbuf = oldpnbuf; fail: /* note that we've clobbered the header */ epp->ep_flags |= EXEC_DESTR; @@ -268,7 +270,7 @@ fail: } else vn_close(scriptvp, FREAD, p->p_ucred, p); - FREE(oldpnbuf, M_NAMEI); + FREE(epp->ep_ndp->ni_pnbuf, M_NAMEI); /* free the fake arg list, because we're not returning it */ tmpsap = shellargp; |
