From a575ed68fcf5c96167e2282e65ef4a36f68af219 Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 15 Sep 2025 08:39:22 +0000 Subject: [PATCH] test correct variable for file_new() return value found with smatch, ok ratchov@ --- usr.bin/sndiod/listen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/sndiod/listen.c b/usr.bin/sndiod/listen.c index c768bcfa322..04dbdd00eb7 100644 --- a/usr.bin/sndiod/listen.c +++ b/usr.bin/sndiod/listen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: listen.c,v 1.15 2024/12/20 07:35:56 ratchov Exp $ */ +/* $OpenBSD: listen.c,v 1.16 2025/09/15 08:39:22 jsg Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov * @@ -167,7 +167,7 @@ listen_new_tcp(char *addr, unsigned int port) } f = xmalloc(sizeof(struct listen)); f->file = file_new(&listen_fileops, f, "tcp", 1); - if (f == NULL) { + if (f->file == NULL) { bad_close: close(s); continue;