ITS#9936 slapcat/slapschema: fix free of subtree cmdline option

Must dup arg since subtree may also come from parsed URL.
This commit is contained in:
Howard Chu 2022-10-20 12:27:01 +01:00
parent 3991a0d191
commit cbdeb374cf

View file

@ -536,7 +536,7 @@ slap_tool_init(
case SLAPSCHEMA: case SLAPSCHEMA:
/* dump subtree */ /* dump subtree */
ch_free( subtree ); ch_free( subtree );
subtree = optarg; subtree = ch_strdup( optarg );
break; break;
} }
break; break;