mbox series

[iproute2,0/5] Fix memory leaks in callers of rtnl_talk()

Message ID 20220710235254.568878-1-bpoirier@nvidia.com (mailing list archive)
Headers show
Series Fix memory leaks in callers of rtnl_talk() | expand

Message

Benjamin Poirier July 10, 2022, 11:52 p.m. UTC
The answer returned by rtnl_recvmsg() must be freed by the caller. A few
callers, through rtnl_talk(), mistakenly omit to free the result, leading
to memory leaks. The impact of these leaks is minimal but they clutter the
output of valgrind and similar tools and they lead to inconsistent code
patterns.

Benjamin Poirier (5):
  ip address: Fix memory leak when specifying device
  bridge: Fix memory leak when doing 'fdb get'
  mptcp: Fix memory leak when doing 'endpoint show'
  mptcp: Fix memory leak when getting limits
  ip neigh: Fix memory leak when doing 'get'

 bridge/fdb.c   |  7 +++++--
 ip/ipaddress.c |  2 ++
 ip/ipmptcp.c   | 11 ++++++++---
 ip/ipneigh.c   |  2 ++
 4 files changed, 17 insertions(+), 5 deletions(-)