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-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbdeb374cf43ed783af8544c820d240a2eb024bb;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 8c88a9fbf7..b4766c0c02 100644 --- a/servers/slapd/slapcommon.c +++ b/servers/slapd/slapcommon.c @@ -536,7 +536,7 @@ slap_tool_init( case SLAPSCHEMA: /* dump subtree */ ch_free( subtree ); - subtree = optarg; + subtree = ch_strdup( optarg ); break; } break;