Change to talloc_zero_size instead of extra memset.
authorJeremy Allison <jra@samba.org>
Tue, 14 Jul 2009 23:54:01 +0000 (16:54 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 14 Jul 2009 23:54:01 +0000 (16:54 -0700)
Jeremy.

lib/tevent/tevent_req.c

index 1ddf9ef15577c2ac6f0fb040c1bdf40a3c56489f..0feabb5f1f9d7bd2674fdf81cf4ad6146b8da520 100644 (file)
@@ -104,12 +104,11 @@ struct tevent_req *_tevent_req_create(TALLOC_CTX *mem_ctx,
                return NULL;
        }
 
-       data = talloc_size(req, data_size);
+       data = talloc_zero_size(req, data_size);
        if (data == NULL) {
                talloc_free(req);
                return NULL;
        }
-       memset(data, '\0', data_size);
        talloc_set_name_const(data, type);
 
        req->data = data;