| |
@@ -322,6 +322,8 @@
|
| |
if (pb->pb_intop != NULL) {
|
| |
_pblock_assert_pb_intop(new_pb);
|
| |
*(new_pb->pb_intop) = *(pb->pb_intop);
|
| |
+ /* set pwdpolicy to NULL so this clone allocates its own policy */
|
| |
+ new_pb->pb_intop->pwdpolicy = NULL;
|
| |
}
|
| |
if (pb->pb_intplugin != NULL) {
|
| |
_pblock_assert_pb_intplugin(new_pb);
|
| |
Bug Description:
We clone a pblock in a psearch search, and under certain
error conditions this pblock is freed, but it frees the
password policy struct which can lead to a double free
when the original pblock is destroyed.
Fix Description:
During the cloning, set the pwppolicy struct to NULL
so the clone allocates its own policy if needed
https://pagure.io/389-ds-base/issue/49932
Reviewed by: ?