From d03acd720975afa961449aaf9fb93cf1ac61733a Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 3 Nov 2001 22:02:57 +0000 Subject: [PATCH] Fix uninitialized pointer bug. --- servers/slapd/daemon.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.39.5