mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-10-25 22:50:12 -05:00
kdb: prevent double crash in RBCD ACL free
acl_list was set to prev->tl_data_contents and its value is freed but then is is freed again outside of the if(). Just reset acl_list pointer as prev->tl_data_contents is removed unconditionally outside of the RBCD ACL removal. Related: https://pagure.io/freeipa/issue/9367 Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
1 parent
eada98e48d
commit
a53b2a374d
1 file changed
+2
-1
@@ -2160,7 +2160,8 @@ void ipadb_free_principal(krb5_context kcontext, krb5_db_entry *entry)
|
||||
for (i = 0; (acl_list != NULL) && (acl_list[i] != NULL); i++) {
|
||||
free(acl_list[i]);
|
||||
}
|
||||
free(acl_list);
|
||||
/* prev->tl_data_contents will be removed below */
|
||||
acl_list = NULL;
|
||||
}
|
||||
free(prev->tl_data_contents);
|
||||
free(prev);
|
||||
|
||||
Reference in new issue
Block a user