]> granicus.if.org Git - libnl/commit
route/cls: fix potential memory leak
authorIlya Pronin <ipronin@twitter.com>
Thu, 23 Aug 2018 23:12:25 +0000 (16:12 -0700)
committerThomas Haller <thaller@redhat.com>
Wed, 10 Oct 2018 09:48:55 +0000 (11:48 +0200)
commit1ac40683a879a602dbf8c42372677fb94f958a7d
tree7872233e2e0a50c57f9605602805f12d5a96008b
parentd1b5f55b312bc296ef25ce2a4a7520e74db2daca
route/cls: fix potential memory leak

rtnl_act_append() cannot add more than TCA_ACT_MAX_PRIO actions to the
same list. Because of that rtnl_basic_add_action() and
rtnl_u32_add_action() should not increment the reference counter of the
given action until it is successfully added to the filter's list.

Signed-off-by: Ilya Pronin <ipronin@twitter.com>
Fixes: e5d9b828f6ec64fd77854578fbf1c33f214f3ac4
https://github.com/thom311/libnl/pull/201
lib/route/cls/basic.c
lib/route/cls/u32.c