]> 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)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 25 Oct 2022 19:14:23 +0000 (19:14 +0000)
Must dup arg since subtree may also come from parsed URL.

servers/slapd/slapcommon.c

index 44c7aa62fe29b102752350bee17b5aeaa0bd532e..374d08f6b5cc6f58322130fdafb351fc22d9a85e 100644 (file)
@@ -536,7 +536,7 @@ slap_tool_init(
                        case SLAPSCHEMA:
                                /* dump subtree */
                                ch_free( subtree );
-                               subtree = optarg;
+                               subtree = ch_strdup( optarg );
                                break;
                        }
                        break;