mirror of
https://github.com/samba-team/samba.git
synced 2025-06-03 17:05:54 +03:00
talloc: when we enable NULL tracking, reparent the autofree context
If NULL tracking is enabled after the autofree context is initialised then autofree ends up separate from the null_context. This means that talloc_report_full() doesn't report the autofree context. Fix this by reparenting the autofree context when we create the null_context.
This commit is contained in:
parent
089dc64cbb
commit
00fb6705ff
@ -1468,6 +1468,9 @@ void talloc_enable_null_tracking(void)
|
||||
{
|
||||
if (null_context == NULL) {
|
||||
null_context = _talloc_named_const(NULL, 0, "null_context");
|
||||
if (autofree_context != NULL) {
|
||||
talloc_reparent(NULL, null_context, autofree_context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user