]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
parent from the correct ctx
authorAlan T. DeKok <aland@freeradius.org>
Tue, 26 Oct 2021 12:39:46 +0000 (08:39 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 26 Oct 2021 12:39:46 +0000 (08:39 -0400)
src/protocols/dhcpv6/decode.c
src/protocols/radius/decode.c

index 12868aa273ccd4220d24f04ff2aee64164a625c5..4dd2fa297e67685a9ba9ef5350b11fcf9827134b 100644 (file)
@@ -626,7 +626,7 @@ static int decode_test_ctx(void **out, TALLOC_CTX *ctx)
        test_ctx = talloc_zero(ctx, fr_dhcpv6_decode_ctx_t);
        if (!test_ctx) return -1;
 
-       test_ctx->tmp_ctx = talloc(ctx, uint8_t);
+       test_ctx->tmp_ctx = talloc(test_ctx, uint8_t);
        talloc_set_destructor(test_ctx, _test_ctx_free);
 
        *out = test_ctx;
index 3bb9a9d1c4f7d6031837b46c9f45a6b038c1152d..c4e197ac74cf38269ef8a7868047f460386417fe 100644 (file)
@@ -1810,7 +1810,7 @@ static int decode_test_ctx(void **out, TALLOC_CTX *ctx)
        test_ctx = talloc_zero(ctx, fr_radius_ctx_t);
        test_ctx->secret = talloc_strdup(test_ctx, "testing123");
        memcpy(test_ctx->vector, vector, sizeof(test_ctx->vector));
-       test_ctx->tmp_ctx = talloc_zero(ctx, uint8_t);
+       test_ctx->tmp_ctx = talloc_zero(test_ctx, uint8_t);
        talloc_set_destructor(test_ctx, _test_ctx_free);
 
        *out = test_ctx;