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 3395244..d80b8c8 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);