]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Don't leak memory in cond_normalise_attribute
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 9 Oct 2019 20:58:44 +0000 (16:58 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 9 Oct 2019 21:56:39 +0000 (17:56 -0400)
src/bin/unit_test_attribute.c

index 4075343ce27076b5e9590786829701b28d8e9130..f27ebf07609d0a25f6e3b55a843c092963195f67 100644 (file)
@@ -832,6 +832,8 @@ static size_t command_normalise_attribute(command_result_t *result, command_ctx_
        }
 
        len = fr_pair_snprint(data, COMMAND_OUTPUT_MAX, head);
+       talloc_list_free(&head);
+
        if (is_truncated(len, COMMAND_OUTPUT_MAX)) {
                fr_strerror_printf("Encoder output would overflow output buffer");
                RETURN_DRAIN_ERROR_STACK_TO_DATA();