]> git.ipfire.org Git - thirdparty/iproute2.git/commit
ip: fix memory leak in 'ip maddr show'
authorMaxim Petrov <mmrmaximuzz@gmail.com>
Sun, 15 Oct 2023 14:32:12 +0000 (16:32 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 16 Oct 2023 16:15:04 +0000 (09:15 -0700)
commit575322b09c3c6bc1806f2faa31edcfb64df302bb
tree78bfd225e605bb6e93d6ad2cb64e076775614dca
parentf1160a0f6bb3bbd012447e955c13bc7591f4f3a8
ip: fix memory leak in 'ip maddr show'

In `read_dev_mcast`, the list of ma_info is allocated, but not cleared
after use. Free the list in the end to make valgrind happy.

Detected by valgrind: "valgrind ./ip/ip maddr show"

Signed-off-by: Maxim Petrov <mmrmaximuzz@gmail.com>
ip/ipmaddr.c