pthreadpool: use talloc_zero() in tests_cmocka.c setup_pthreadpool_tevent()
authorStefan Metzmacher <metze@samba.org>
Wed, 20 Jun 2018 13:38:08 +0000 (15:38 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 12 Jul 2018 12:25:18 +0000 (14:25 +0200)
This was found with valgrind.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
lib/pthreadpool/tests_cmocka.c

index 33952442e1d6238c059a0186c8328cafbc33e2d5..d80b8c8f775a2dc57ae4f68652e19b849e6e1f0e 100644 (file)
@@ -41,7 +41,7 @@ static int setup_pthreadpool_tevent(void **state)
        struct pthreadpool_tevent_test *t;
        int ret;
 
-       t = talloc(NULL, struct pthreadpool_tevent_test);
+       t = talloc_zero(NULL, struct pthreadpool_tevent_test);
        assert_non_null(t);
 
        t->ev = tevent_context_init(t);