]> git.ipfire.org Git - thirdparty/iproute2.git/commit
ip-route: Fix for memleak in error path
authorPhil Sutter <phil@nwl.cc>
Thu, 18 Oct 2018 12:30:31 +0000 (14:30 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 22 Oct 2018 17:05:43 +0000 (10:05 -0700)
commite5da392ff8e3979b86cad04b238ffbbc8076e005
tree077b727fdf4b7809fe1cbb37f1bcadf6aa407ab1
parent3b0070f6b1a319b7d6a431a39270a4804cb5927e
ip-route: Fix for memleak in error path

If call to rta_addattr_l() failed, parse_encap_seg6() would leak memory.
Fix this by making sure calls to free() are not skipped.

Fixes: bd59e5b1517b0 ("ip-route: Fix segfault with many nexthops")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
ip/iproute_lwtunnel.c