summaryrefslogtreecommitdiff
path: root/daemons
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2021-09-21 18:07:41 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2021-09-21 21:03:47 +0200
commit462ac47003e14975b91832f19bc287bd1a775bb4 (patch)
treec93a8c98b15d8824cb810926c249cb3240f98ec7 /daemons
parentbb6fd1a15f32d79ddaa351704dea47ad9e5ab9be (diff)
downloadlvm2-462ac47003e14975b91832f19bc287bd1a775bb4.tar.gz
clang: check for buffer existance
Make obvious to analyzer we can't get NULL here.
Diffstat (limited to 'daemons')
-rw-r--r--daemons/dmeventd/dmeventd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/daemons/dmeventd/dmeventd.c b/daemons/dmeventd/dmeventd.c
index 75672a7fd..46b3ff12f 100644
--- a/daemons/dmeventd/dmeventd.c
+++ b/daemons/dmeventd/dmeventd.c
@@ -678,6 +678,9 @@ static int _get_status(struct message_data *message_data)
char **buffers;
char *message;
+ if (!message_data->id)
+ return -EINVAL;
+
_lock_mutex();
count = dm_list_size(&_thread_registry);
buffers = alloca(sizeof(char*) * count);