diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/if_pppx.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/net/if_pppx.c b/sys/net/if_pppx.c index 4dbe420bc18..5571ff14f4d 100644 --- a/sys/net/if_pppx.c +++ b/sys/net/if_pppx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pppx.c,v 1.27 2014/04/04 03:34:41 jsg Exp $ */ +/* $OpenBSD: if_pppx.c,v 1.28 2014/04/05 13:30:59 miod Exp $ */ /* * Copyright (c) 2010 Claudio Jeker <claudio@openbsd.org> @@ -590,8 +590,10 @@ pppxclose(dev_t dev, int flags, int mode, struct proc *p) rw_enter_write(&pppx_devs_lk); - if ((pxd = pppx_dev_lookup(dev)) == NULL) + if ((pxd = pppx_dev_lookup(dev)) == NULL) { + rw_exit_write(&pppx_devs_lk); return (ENXIO); + } /* XXX */ while ((pxi = LIST_FIRST(&pxd->pxd_pxis))) |