From 1f70da1ff20ed99f2a3ac26a61a6492279bd44de Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <tytso@mit.edu>
Date: Tue, 3 Aug 2021 11:03:34 -0400
Subject: [PATCH 38/46] ss_create_invocation: fix potential unititalized
reference in error path
Content-Type: text/plain
Fixes: eccdde1ff381 ("ss_create_invocation: fix error handling when ...")
Addresses-Coverity-Bug: 1489771
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
---
lib/ss/invocation.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/ss/invocation.c b/lib/ss/invocation.c
index bf5ea0ce..7d7458a7 100644
--- a/lib/ss/invocation.c
+++ b/lib/ss/invocation.c
@@ -36,6 +36,7 @@ int ss_create_invocation(const char *subsystem_name, const char *version_string,
new_table = (ss_data *) malloc(sizeof(ss_data));
if (!new_table)
goto out;
+ memset(new_table, 0, sizeof(ss_data));
if (table == (ss_data **) NULL) {
table = (ss_data **) malloc(2 * size);
--
2.35.1