diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2021-09-18 21:01:48 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2021-09-20 13:58:57 +0200 |
commit | 93d565eda992abc0460cc8fc7b9998bd1996a447 (patch) | |
tree | 75a7d267d8484f77350cc642da9e232666e786b7 /daemons | |
parent | 5126ac7c3aa4f9f47a36c66095246d5b13871e61 (diff) | |
download | lvm2-93d565eda992abc0460cc8fc7b9998bd1996a447.tar.gz |
gcc-fanalyzer: use zeroed memory
Analyzer here was rather confused about possiblity of loosing previously
assigned device pointers - fixed by passing zero initialize memory
before first assign.
Diffstat (limited to 'daemons')
-rw-r--r-- | daemons/dmeventd/dmeventd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/daemons/dmeventd/dmeventd.c b/daemons/dmeventd/dmeventd.c index 041718c7a..c44fa4ed9 100644 --- a/daemons/dmeventd/dmeventd.c +++ b/daemons/dmeventd/dmeventd.c @@ -2069,7 +2069,7 @@ static void _restart_dmeventd(void) ++count; } - if (!(_initial_registrations = malloc(sizeof(char*) * (count + 1)))) { + if (!(_initial_registrations = zalloc(sizeof(char*) * (count + 1)))) { fprintf(stderr, "Memory allocation registration failed.\n"); goto bad; } |