From ae90d84d00b427df64259a5e76b2fb3f044864dd Mon Sep 17 00:00:00 2001 From: ratchov Date: Tue, 2 Apr 2024 05:21:32 +0000 Subject: [PATCH] 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. --- usr.bin/sndiod/dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } } -- 2.20.1