]> The Tcpdump Group git mirrors - libpcap/commitdiff
Merge pull request #774 from catenacyber/uninit
authorGuy Harris <[email protected]>
Tue, 23 Oct 2018 08:29:50 +0000 (01:29 -0700)
committerGitHub <[email protected]>
Tue, 23 Oct 2018 08:29:50 +0000 (01:29 -0700)
Initializing np value to NULL

nametoaddr.c

index 7d65198ee3d04a19fdc2a91b5a94f8597844923c..e50b48215ab66214da5d1d43e5b138c7247aef11 100644 (file)
@@ -239,7 +239,7 @@ pcap_nametonetaddr(const char *name)
        /*
         * UN*X.
         */
-       struct netent *np;
+       struct netent *np = NULL;
   #if defined(HAVE_LINUX_GETNETBYNAME_R)
        /*
         * We have Linux's reentrant getnetbyname_r().