From: ratchov Date: Tue, 2 Apr 2024 05:21:32 +0000 (+0000) Subject: sndiod: Fix confusion between the slot and ctlslot pointers X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ae90d84d00b427df64259a5e76b2fb3f044864dd;p=openbsd sndiod: Fix confusion between the slot and ctlslot pointers Fixes crash when the device is disconnected and the clients are not migrated to another device. --- diff --git a/usr.bin/sndiod/dev.c b/usr.bin/sndiod/dev.c index bd0ed8daa0c..235b6d5d56a 100644 --- a/usr.bin/sndiod/dev.c +++ b/usr.bin/sndiod/dev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dev.c,v 1.107 2023/12/09 22:12:03 ratchov Exp $ */ +/* $OpenBSD: dev.c,v 1.108 2024/04/02 05:21:32 ratchov Exp $ */ /* * Copyright (c) 2008-2012 Alexandre Ratchov * @@ -1108,7 +1108,7 @@ dev_abort(struct dev *d) if (c->ops == NULL) continue; if (c->opt == o) { - c->ops->exit(s->arg); + c->ops->exit(c->arg); c->ops = NULL; } }