]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Ensure tmpl cursor is cleared on failure
authorNick Porter <nick@portercomputing.co.uk>
Tue, 2 Aug 2022 15:18:25 +0000 (16:18 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Thu, 4 Aug 2022 11:15:28 +0000 (12:15 +0100)
src/lib/unlang/xlat_builtin.c

index b8f0c457b09497d6f6f298f24feb02efdbe7fdbc..75bd11fb3553288b02e951f279194cbdb38199a6 100644 (file)
@@ -2586,6 +2586,7 @@ static xlat_action_t xlat_func_pairs(TALLOC_CTX *ctx, fr_dcursor_t *out,
                if (unlikely(fr_pair_aprint(vb, &buff, NULL, vp) < 0)) {
                        RPEDEBUG("Failed printing pair");
                        talloc_free(vb);
+                       tmpl_dursor_clear(&cc);
                        return XLAT_ACTION_FAIL;
                }