diff options
author | 2013-11-18 21:16:55 +0000 | |
---|---|---|
committer | 2013-11-18 21:16:55 +0000 | |
commit | 6e7cabcc47137bbfa4c4fc47d21842544b69e794 (patch) | |
tree | c17255ad6da66afce81b7d92ec7977ff37406cfb | |
parent | Give /dev/drm0 to the user logged on the console to be able (diff) | |
download | wireguard-openbsd-6e7cabcc47137bbfa4c4fc47d21842544b69e794.tar.xz wireguard-openbsd-6e7cabcc47137bbfa4c4fc47d21842544b69e794.zip |
Fix potential null dereference.
Found by LLVM/Clang Static Analyzer.
ok benno@ henning@
-rw-r--r-- | sys/net/if_pfsync.c | 4 |
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) { |