diff options
author | 2017-02-15 21:28:23 +0000 | |
---|---|---|
committer | 2017-02-15 21:28:23 +0000 | |
commit | 2b204a4b4555840209afff14ff4be26f74028389 (patch) | |
tree | deeca86a1f1ddcc70a0df366b08074c4458db205 | |
parent | gcc4 on m88k still uses sjlj exceptions, as did arm before EABI. (diff) | |
download | wireguard-openbsd-2b204a4b4555840209afff14ff4be26f74028389.tar.xz wireguard-openbsd-2b204a4b4555840209afff14ff4be26f74028389.zip |
Fix the code supposed to abort when attempting to detach a slot that's
not on the slot list (the check was a no-op). Found by jsg@, thanks!
-rw-r--r-- | usr.bin/sndiod/dev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/sndiod/dev.c b/usr.bin/sndiod/dev.c index eae2a8a50ba..8adca3c1c02 100644 --- a/usr.bin/sndiod/dev.c +++ b/usr.bin/sndiod/dev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dev.c,v 1.27 2017/01/03 06:53:20 ratchov Exp $ */ +/* $OpenBSD: dev.c,v 1.28 2017/02/15 21:28:23 ratchov Exp $ */ /* * Copyright (c) 2008-2012 Alexandre Ratchov <alex@caoua.org> * @@ -1823,7 +1823,7 @@ slot_detach(struct slot *s) #endif for (ps = &s->dev->slot_list; *ps != s; ps = &(*ps)->next) { #ifdef DEBUG - if (s == NULL) { + if (*ps == NULL) { slot_log(s); log_puts(": can't detach, not on list\n"); panic(); |