]> 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:12:57 +0000 (19:12 +0000)
Must dup arg since subtree may also come from parsed URL.

servers/slapd/slapcommon.c

index e58c8bea3af5b6223d704470a6f275635d95aac0..5983f2ad130c797d81c963c60b6be4c0e0a940d9 100644 (file)
@@ -538,7 +538,7 @@ slap_tool_init(
                        case SLAPSCHEMA:
                                /* dump subtree */
                                ch_free( subtree );
-                               subtree = optarg;
+                               subtree = ch_strdup( optarg );
                                break;
                        }
                        break;