]> git.ipfire.org Git - thirdparty/iproute2.git/commit
tc: f_u32: fix json object leak
authorHangbin Liu <liuhangbin@gmail.com>
Tue, 28 Feb 2023 07:31:46 +0000 (15:31 +0800)
committerStephen Hemminger <stephen@networkplumber.org>
Sun, 5 Mar 2023 16:35:57 +0000 (08:35 -0800)
commit6637a6d512a940c3d9c101f4eaca3c1c7a36517c
tree9283d9aa82917d003d56720af5bff1563cd92839
parent2854d69a99f6e38d0d2426bd641a56d7a85bc61b
tc: f_u32: fix json object leak

Previously, the code returned directly within the switch statement in
the functions print_{ipv4, ipv6}. While this approach was functional,
after the commit 721435dc, we can no longer return directly because we
need to close the match object. To resolve this issue, replace the return
statement with break.

Fixes: 721435dcfd92 ("tc: u32: add json support in `print_raw`, `print_ipv4`, `print_ipv6`")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
tc/f_u32.c