From: Alan T. DeKok Date: Sun, 4 Feb 2024 16:12:44 +0000 (-0500) Subject: make sure to free tag ctx, too X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a0d936091ead7aaac08bec5bb83de0205273dba;p=thirdparty%2Ffreeradius-server.git make sure to free tag ctx, too --- diff --git a/src/protocols/radius/decode.c b/src/protocols/radius/decode.c index 5489bb27a6c..2bbbcd53642 100644 --- a/src/protocols/radius/decode.c +++ b/src/protocols/radius/decode.c @@ -2115,6 +2115,12 @@ ssize_t fr_radius_decode_foreign(TALLOC_CTX *ctx, fr_pair_list_t *out, return data_len; } +static int _test_ctx_free(fr_radius_decode_ctx_t *ctx) +{ + TALLOC_FREE(ctx->tags); + + return 0; +} static int decode_test_ctx(void **out, TALLOC_CTX *ctx) { @@ -2132,6 +2138,7 @@ static int decode_test_ctx(void **out, TALLOC_CTX *ctx) test_ctx->request_authenticator = vector; test_ctx->tmp_ctx = talloc_zero(test_ctx, uint8_t); + talloc_set_destructor(test_ctx, _test_ctx_free); *out = test_ctx;