[dm-devel] [PATCH 03/21] multipathd (coverity): terminate uxlsnr when polls allocation fails
mwilck at suse.com
mwilck at suse.com
Thu Nov 18 23:13:20 UTC 2021
From: Martin Wilck <mwilck at suse.com>
The polls array is dereferenced later on, so even if we are soon
to be cancelled, we should return immediately here.
Signed-off-by: Martin Wilck <mwilck at suse.com>
---
multipathd/uxlsnr.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/multipathd/uxlsnr.c b/multipathd/uxlsnr.c
index 6355279..d42cb04 100644
--- a/multipathd/uxlsnr.c
+++ b/multipathd/uxlsnr.c
@@ -607,6 +607,7 @@ void *uxsock_listen(long ux_sock, void *trigger_data)
if (!polls) {
condlog(0, "uxsock: failed to allocate poll fds");
exit_daemon();
+ return NULL;
}
notify_fd = inotify_init1(IN_NONBLOCK);
if (notify_fd == -1) /* it's fine if notifications fail */
--
2.33.1
More information about the dm-devel
mailing list