From e20b37fac1fc357f0424a99414fcdb0a628bcff7 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] ss_create_invocation: fix potential unititalized reference in
 error path

Fixes: eccdde1ff381 ("ss_create_invocation: fix error handling when ...")
Addresses-Coverity-Bug: 1489771
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 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.25.1

