From 2c5b861c8055ef68038273110ea81975e1c6b425 Mon Sep 17 00:00:00 2001 From: "Enrico Loparco (eloparco)" Date: Wed, 14 Sep 2022 15:57:25 +0000 Subject: fix(strategy): fix memory leaks detected by valgrind in unit tests Ref: HICN-785 Signed-off-by: Enrico Loparco (eloparco) Change-Id: I0102bdba4257b891fc6843d42e6eccc5e48687dc --- lib/src/test/test_name.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/src/test/test_name.cc') diff --git a/lib/src/test/test_name.cc b/lib/src/test/test_name.cc index 35e636b63..dbeab96cc 100644 --- a/lib/src/test/test_name.cc +++ b/lib/src/test/test_name.cc @@ -31,9 +31,11 @@ protected: NameTest () : name_{}, name4_{}, name6_{} { + ipv6_prefix_bytes = {}; int rc = inet_pton (AF_INET6, ipv6_prefix, &ipv6_prefix_bytes.v6); EXPECT_EQ (rc, 1); + ipv4_prefix_bytes = {}; rc = inet_pton (AF_INET, ipv4_prefix, &ipv4_prefix_bytes.v4); EXPECT_EQ (rc, 1); -- cgit 1.2.3-korg