From: Kurt Zeilenga Date: Sat, 3 Nov 2001 22:02:57 +0000 (+0000) Subject: Fix uninitialized pointer bug. X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~906 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d03acd720975afa961449aaf9fb93cf1ac61733a;p=openldap Fix uninitialized pointer bug. --- diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index 9f2b907968..8e6ef5b1ff 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -396,6 +396,7 @@ static int slap_get_listener_addresses( } sap = *sal; + *sap = NULL; for ( sai=res; sai; sai=sai->ai_next ) { if( sai->ai_addr == NULL ) { @@ -436,13 +437,14 @@ static int slap_get_listener_addresses( *sap = NULL; break; } + if (*sap != NULL) { (*sap)->sa_family = sai->ai_family; sap++; + *sap = NULL; } } - *sap = NULL; freeaddrinfo(res); #else struct in_addr in;