]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
let's free vpt, too
authorAlan T. DeKok <aland@freeradius.org>
Tue, 10 Aug 2021 18:25:23 +0000 (14:25 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 10 Aug 2021 18:25:23 +0000 (14:25 -0400)
src/lib/unlang/xlat_builtin.c

index 0d41e58a59cf0ef96413e62ea0a2e08e8a5931d3..74582be387546c4f22c8db99c8395ce3c3919d4f 100644 (file)
@@ -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.