From: Howard Chu Date: Thu, 20 Oct 2022 11:27:01 +0000 (+0100) Subject: ITS#9936 slapcat/slapschema: fix free of subtree cmdline option X-Git-Tag: OPENLDAP_REL_ENG_2_5_14~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebdf659b8ea9871bf0aad9b003ba241a33e51ee3;p=thirdparty%2Fopenldap.git ITS#9936 slapcat/slapschema: fix free of subtree cmdline option Must dup arg since subtree may also come from parsed URL. --- diff --git a/servers/slapd/slapcommon.c b/servers/slapd/slapcommon.c index e58c8bea3a..5983f2ad13 100644 --- a/servers/slapd/slapcommon.c +++ b/servers/slapd/slapcommon.c @@ -538,7 +538,7 @@ slap_tool_init( case SLAPSCHEMA: /* dump subtree */ ch_free( subtree ); - subtree = optarg; + subtree = ch_strdup( optarg ); break; } break;