aboutsummaryrefslogtreecommitdiffstats
path: root/fad-win32.c
diff options
context:
space:
mode:
authorrisso <risso>2004-04-30 09:12:42 +0000
committerrisso <risso>2004-04-30 09:12:42 +0000
commit3787448b64d38260656ab807ebc8c98cd23fdea4 (patch)
treef84f1900a6317177fd15f661ba805f39181de8c3 /fad-win32.c
parent5f53d2308e89c07b00dd1b78e5956591185b6d66 (diff)
Fixed a bug in pcap_findalldevs on Win32 that not initialized *alldevsp to NULL
if no adapters are present.
Diffstat (limited to 'fad-win32.c')
-rw-r--r--fad-win32.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fad-win32.c b/fad-win32.c
index 1d67c9b..788fac0 100644
--- a/fad-win32.c
+++ b/fad-win32.c
@@ -32,7 +32,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/libpcap/fad-win32.c,v 1.9 2004-04-30 08:58:52 risso Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/fad-win32.c,v 1.10 2004-04-30 09:12:42 risso Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -231,7 +231,8 @@ pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf)
AdaptersName = (char*) malloc(NameLength);
else
{
- return (NULL);
+ *alldevsp = NULL;
+ return 0;
}
if (AdaptersName == NULL)
{