]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Don't leave interface_id uninitialised
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 4 Feb 2022 18:19:34 +0000 (13:19 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 4 Feb 2022 18:19:34 +0000 (13:19 -0500)
src/process/dhcpv6/base.c

index eae4266fa8240b2539223c936d3e8c994010df7a..be83a985b5f4265656dd1f772fe505f3c0ed9df0 100644 (file)
@@ -647,7 +647,7 @@ process_dhcpv6_relay_fields_t *dhcpv6_relay_fields_store(request_t *request)
        /*
         *      Remember the relay fields
         */
-       MEM(rctx = talloc(unlang_interpret_frame_talloc_ctx(request), process_dhcpv6_relay_fields_t));
+       MEM(rctx = talloc_zero(unlang_interpret_frame_talloc_ctx(request), process_dhcpv6_relay_fields_t)); /* Safer to zero the whole thing */
        MEM(rctx->hop_count = fr_pair_copy(rctx, hop_count));
        MEM(rctx->link_address = fr_pair_copy(rctx, link_address));
        MEM(rctx->peer_address = fr_pair_copy(rctx, peer_address));