From 3e67e7f9c3793e8b3d64d634a04a9561a6ac1f7e Mon Sep 17 00:00:00 2001 From: phk Date: Wed, 16 Nov 1994 06:09:29 +0000 Subject: Fix a panic I might have seen, or at least could see some day if I havn't already. --- sys/i386/isa/lpt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/i386/isa/lpt.c b/sys/i386/isa/lpt.c index 70187ee..8635144 100644 --- a/sys/i386/isa/lpt.c +++ b/sys/i386/isa/lpt.c @@ -46,7 +46,7 @@ * SUCH DAMAGE. * * from: unknown origin, 386BSD 0.1 - * $Id: lpt.c,v 1.22 1994/10/27 05:08:28 phk Exp $ + * $Id: lpt.c,v 1.23 1994/11/13 21:14:30 nate Exp $ */ /* @@ -894,7 +894,8 @@ lpioctl(struct ifnet *ifp, int cmd, caddr_t data) sc->sc_ifbuf = ptr; return ENOBUFS; } - free(ptr,M_DEVBUF); + if (ptr) + free(ptr,M_DEVBUF); sc->sc_if.if_mtu = ifr->ifr_metric; break; -- cgit v1.1