From 23939b625bb7f0e5d9743f3dd286d73216b7f7e1 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Thu, 17 Jun 2021 12:31:11 +0200 Subject: segtree: memleak in error path of the set to segtree conversion Release the array of intervals and the segtree in case of error, otherwise these structures and objects are never released: SUMMARY: AddressSanitizer: 2864 byte(s) leaked in 37 allocation(s). Moreover, improve existing a test coverage of this error path. Signed-off-by: Pablo Neira Ayuso --- tests/py/inet/ip.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/py/inet') diff --git a/tests/py/inet/ip.t b/tests/py/inet/ip.t index 86604a63..ac5b825e 100644 --- a/tests/py/inet/ip.t +++ b/tests/py/inet/ip.t @@ -8,4 +8,4 @@ ip saddr . ip daddr . ether saddr { 1.1.1.1 . 2.2.2.2 . ca:fe:ca:fe:ca:fe };ok ip saddr vmap { 10.0.1.0-10.0.1.255 : accept, 10.0.1.1-10.0.2.255 : drop };fail -ip saddr vmap { 1.1.1.1-1.1.1.255 : accept, 1.1.1.0-1.1.2.1 : drop};fail +ip saddr vmap { 3.3.3.3-3.3.3.4 : accept, 1.1.1.1-1.1.1.255 : accept, 1.1.1.0-1.1.2.1 : drop};fail -- cgit v1.2.3