*/
void tmpl_dursor_clear(tmpl_dcursor_ctx_t *cc)
{
- if (!fr_dlist_num_elements(&cc->nested)) return;/* Help simplify dealing with unused cursor ctxs */
-
- fr_dlist_remove(&cc->nested, &cc->leaf); /* Noop if leaf isn't inserted */
- fr_dlist_talloc_free(&cc->nested);
-
/*
* Always free the pool because it's allocated when
* any nested ctxs are used.
*/
TALLOC_FREE(cc->pool);
+
+ if (!fr_dlist_num_elements(&cc->nested)) return;/* Help simplify dealing with unused cursor ctxs */
+
+ fr_dlist_remove(&cc->nested, &cc->leaf); /* Noop if leaf isn't inserted */
+ fr_dlist_talloc_free(&cc->nested);
}