From: Alan T. DeKok Date: Tue, 10 Aug 2021 18:25:23 +0000 (-0400) Subject: let's free vpt, too X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59d7e39551d3dccf5a1047bd16ab9475c922ad0e;p=thirdparty%2Ffreeradius-server.git let's free vpt, too --- diff --git a/src/lib/unlang/xlat_builtin.c b/src/lib/unlang/xlat_builtin.c index 0d41e58a59c..74582be3875 100644 --- a/src/lib/unlang/xlat_builtin.c +++ b/src/lib/unlang/xlat_builtin.c @@ -3166,6 +3166,7 @@ static xlat_action_t protocol_encode_xlat(TALLOC_CTX *ctx, fr_dcursor_t *out, */ if (tp_encode->test_ctx) { if (tp_encode->test_ctx(&encode_ctx, ctx) < 0) { + talloc_free(vpt); return XLAT_ACTION_FAIL; } } @@ -3194,6 +3195,7 @@ static xlat_action_t protocol_encode_xlat(TALLOC_CTX *ctx, fr_dcursor_t *out, if (len < 0) { RPEDEBUG("Protocol encoding failed"); tmpl_pair_cursor_clear(&cc); + talloc_free(vpt); return XLAT_ACTION_FAIL; } @@ -3202,6 +3204,7 @@ static xlat_action_t protocol_encode_xlat(TALLOC_CTX *ctx, fr_dcursor_t *out, } tmpl_pair_cursor_clear(&cc); + talloc_free(vpt); /* * Pass the options string back to the caller.