lib: Initialize variables in parse_resolvconf_fp
authorVolker Lendecke <vl@samba.org>
Tue, 9 Apr 2019 10:49:00 +0000 (12:49 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 9 Apr 2019 18:29:14 +0000 (18:29 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
libcli/dns/resolvconf.c

index ee2eec6573b31b317e982e4e69d9058d98dc1c42..5cf8b4e7882978a9eda55f7c4acde9308c307e61 100644 (file)
@@ -36,9 +36,9 @@ int parse_resolvconf_fp(
        int ret = 0;
 
        while (true) {
-               char *saveptr, *option, *ns;
-               char **tmp;
-               ssize_t n;
+               char *saveptr = NULL, *option = NULL, *ns = NULL;
+               char **tmp = NULL;
+               ssize_t n = 0;
 
                n = getline(&line, &len, fp);
                if (n < 0) {