aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEnrico Loparco (eloparco) <eloparco@cisco.com>2022-09-14 15:57:25 +0000
committerEnrico Loparco (eloparco) <eloparco@cisco.com>2022-09-14 15:57:25 +0000
commit2c5b861c8055ef68038273110ea81975e1c6b425 (patch)
tree204481342c99c31c0e4a47df92dd840bc9cc15fa /lib
parentab38321508d886f0acd535f0f5f07a3d44e29591 (diff)
fix(strategy): fix memory leaks detected by valgrind in unit tests
Ref: HICN-785 Signed-off-by: Enrico Loparco (eloparco) <eloparco@cisco.com> Change-Id: I0102bdba4257b891fc6843d42e6eccc5e48687dc
Diffstat (limited to 'lib')
-rw-r--r--lib/src/test/test_name.cc2
1 files changed, 2 insertions, 0 deletions
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);