tests: Call res_close in res_query and res_search tests
authorJakub Hrozek <jakub.hrozek@posteo.se>
Thu, 20 Aug 2015 09:49:35 +0000 (11:49 +0200)
committerAndreas Schneider <asn@samba.org>
Mon, 24 Aug 2015 13:16:51 +0000 (15:16 +0200)
This fixes two memory leaks in the tests.

Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
tests/test_res_query_search.c

index 616772c..cc43ca5 100644 (file)
@@ -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)