* as its parent.
*/
if (talloc_link_ctx(ctx, pool) < 0) {
- ERROR("%s: Failed linking pool ctx", __FUNCTION__);
+ PERROR("%s: Failed linking pool ctx", __FUNCTION__);
talloc_free(pool);
return NULL;
{
fr_talloc_destructor_t *d;
- if (!fire_ctx) return NULL;
+ if (!fire_ctx) {
+ fr_strerror_printf("No firing ctx provided when setting destructor");
+ return NULL;
+ }
d = talloc(fire_ctx, fr_talloc_destructor_t);
- if (!d) return NULL;
+ if (!d) {
+ oom:
+ fr_strerror_printf("Out of Memory");
+ return NULL;
+ }
d->fire = fire_ctx;
d->func = func;
ds = talloc(disarm_ctx, fr_talloc_destructor_disarm_t);
if (!ds) {
talloc_free(d);
- return NULL;
+ goto oom;
}
ds->d = d;
d->ds = ds;