summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorCharles Longeau <chl@cvs.openbsd.org>2013-11-18 21:16:56 +0000
committerCharles Longeau <chl@cvs.openbsd.org>2013-11-18 21:16:56 +0000
commit75be7807a411e6207dbddd94d0cbf7c832fe3c25 (patch)
tree856039afe20003fffc467b29526464552df298e8 /sys/net
parentef019da93e21530cefd58b86e5639e4830483fab (diff)
Fix potential null dereference.
Found by LLVM/Clang Static Analyzer. ok benno@ henning@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_pfsync.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_pfsync.c b/sys/net/if_pfsync.c
index b3925fabfdd..19ba6c77fe2 100644
--- a/sys/net/if_pfsync.c
+++ b/sys/net/if_pfsync.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pfsync.c,v 1.203 2013/11/15 12:18:02 henning Exp $ */
+/* $OpenBSD: if_pfsync.c,v 1.204 2013/11/18 21:16:55 chl Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff
@@ -422,7 +422,7 @@ pfsync_syncdev_state(void *arg)
{
struct pfsync_softc *sc = arg;
- if (!sc->sc_sync_if && !(sc->sc_if.if_flags & IFF_UP))
+ if (!sc->sc_sync_if || !(sc->sc_if.if_flags & IFF_UP))
return;
if (sc->sc_sync_if->if_link_state == LINK_STATE_DOWN) {