]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#10204 slapo-constraint: fix double-free on invalid attr
authorHoward Chu <hyc@openldap.org>
Tue, 30 Apr 2024 14:55:01 +0000 (15:55 +0100)
committerHoward Chu <hyc@openldap.org>
Tue, 30 Apr 2024 14:55:01 +0000 (15:55 +0100)
servers/slapd/overlays/constraint.c

index 0d6156af4d8ff63fd04f1a03c610c48556b36b92..9622c29929ad2f6bd5c509a9a74b99c05e3eb259 100644 (file)
@@ -369,6 +369,7 @@ constraint_cf_gen( ConfigArgs *c )
                                                ap.attrs[i] = NULL;
                                                if ( slap_str2ad( ap.lud->lud_attrs[i], &ap.attrs[i], &text ) ) {
                                                        ch_free( ap.attrs );
+                                                       ap.attrs = NULL;
                                                        snprintf( c->cr_msg, sizeof( c->cr_msg ),
                                                                "%s <%s>: %s\n", c->argv[0], ap.lud->lud_attrs[i], text );
                                                        rc = ARG_BAD_CONF;