]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9936 slapcat/slapschema: fix free of subtree cmdline option
authorHoward Chu <hyc@openldap.org>
Thu, 20 Oct 2022 11:27:01 +0000 (12:27 +0100)
committerHoward Chu <hyc@openldap.org>
Thu, 20 Oct 2022 11:27:01 +0000 (12:27 +0100)
Must dup arg since subtree may also come from parsed URL.

servers/slapd/slapcommon.c

index 8c88a9fbf752e688971f19d0e09236fb1df8eff0..b4766c0c02540701ec6461f9e50cdb078dc8a21f 100644 (file)
@@ -536,7 +536,7 @@ slap_tool_init(
                        case SLAPSCHEMA:
                                /* dump subtree */
                                ch_free( subtree );
-                               subtree = optarg;
+                               subtree = ch_strdup( optarg );
                                break;
                        }
                        break;