From 1d5a9116ed7bf4fbe6864892d8af6fdfcb2f71ed Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Thu, 20 Aug 2015 11:49:35 +0200 Subject: [PATCH] tests: Call res_close in res_query and res_search tests This fixes two memory leaks in the tests. Signed-off-by: Jakub Hrozek Reviewed-by: Andreas Schneider Reviewed-by: Stefan Metzmacher --- tests/test_res_query_search.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_res_query_search.c b/tests/test_res_query_search.c index 616772c..cc43ca5 100644 --- a/tests/test_res_query_search.c +++ b/tests/test_res_query_search.c @@ -129,6 +129,8 @@ static void test_res_query(void **state) assert_non_null(inet_ntop(AF_INET, ns_rr_rdata(rr), addr, sizeof(addr))); assert_string_equal(addr, "127.0.10.10"); + + res_close(); } static void test_res_nsearch(void **state) @@ -192,6 +194,8 @@ static void test_res_search(void **state) assert_non_null(inet_ntop(AF_INET, ns_rr_rdata(rr), addr, sizeof(addr))); assert_string_equal(addr, "127.0.10.10"); + + res_close(); } int main(void) -- 2.34.1