]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lib/shells: initialize free-able variables
authorKarel Zak <kzak@redhat.com>
Mon, 22 May 2023 10:43:53 +0000 (12:43 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 22 May 2023 10:43:53 +0000 (12:43 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
lib/shells.c

index e0d065ee25319fe658cb12279a316a3dbfdda3b0..07f4e594030871a65b70e2c89ea065aef579ac50 100644 (file)
@@ -21,8 +21,8 @@ extern int is_known_shell(const char *shell_name)
 #if defined (HAVE_LIBECONF) && defined (USE_VENDORDIR)
        size_t size = 0;
        econf_err error;
-       char **keys;
-       econf_file *key_file;
+       char **keys = NULL;
+       econf_file *key_file = NULL;
 
        error = econf_readDirs(&key_file,
                               _PATH_VENDORDIR,