ITS#10204 slapo-constraint: fix double-free on invalid attr

This commit is contained in:
Howard Chu 2024-04-30 15:55:01 +01:00
parent bd6dc46ad0
commit 6d5400a2c7

View 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;