From: Howard Chu Date: Fri, 2 Sep 2022 03:01:46 +0000 (+0100) Subject: ITS#9912 slapd: urls comes from optarg, not allocated X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6fa0450f6db53846d98b2f2c052f0c5c32a804d;p=thirdparty%2Fopenldap.git ITS#9912 slapd: urls comes from optarg, not allocated May leak on Windows if set in registry. Don't care. --- diff --git a/servers/slapd/main.c b/servers/slapd/main.c index a9e69b01a1..a02d663513 100644 --- a/servers/slapd/main.c +++ b/servers/slapd/main.c @@ -316,9 +316,6 @@ int main( int argc, char **argv ) newUrls = (char *) lutil_getRegParam(regService, "Urls"); if (newUrls) { - if (urls) - ch_free(urls); - urls = ch_strdup(newUrls); Debug(LDAP_DEBUG_ANY, "new urls from registry: %s\n", urls ); @@ -367,7 +364,6 @@ int main( int argc, char **argv ) #endif case 'h': /* listen URLs */ - if ( urls != NULL ) free( urls ); urls = optarg; break;