mirror of https://github.com/ericonr/sndio.git
Fix the code to abort when trying to detach a slot that's not
on the list (the check was a no-op). Found by jsg@, thanks.
This commit is contained in:
parent
ca24b960e4
commit
f9f2d8353e
|
@ -1824,7 +1824,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();
|
||||
|
|
Loading…
Reference in New Issue