diff options
author | Aliaksei Karaliou <akaraliou@panasas.com> | 2018-12-21 16:47:00 +0300 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2019-01-08 03:40:26 +0100 |
commit | facd6f2daf6df0f9c82bcbe36946507736e9648c (patch) | |
tree | 7adaf03387dec135b0da0b97399c2641e69d8445 | |
parent | 24cfa0baf515cf81f21c3f7547b66fd7a44a8ea1 (diff) | |
download | samba-facd6f2daf6df0f9c82bcbe36946507736e9648c.tar.gz |
s4:torture:base:bench-readwrite: fix uninitialized memory causing segfault
Allocation of 'struct smb_composite_connect' happens without zeroing
so that smb_composite_connect_send() thinks that connection
already exists and fails on its handling.
Signed-off-by: Aliaksei Karaliou <akaraliou@panasas.com>
Reviewed-by: Douglas Bagnall <dbagnall@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r-- | source4/torture/basic/misc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/torture/basic/misc.c b/source4/torture/basic/misc.c index 25ae4560de8..8b187f8ddd4 100644 --- a/source4/torture/basic/misc.c +++ b/source4/torture/basic/misc.c @@ -931,8 +931,8 @@ bool run_benchrw(struct torture_context *tctx) switch (state[i]->mode){ /*open multiple connections with the same userid */ case START: - smb_con = talloc( - tctx,struct smb_composite_connect) ; + smb_con = talloc_zero( + tctx,struct smb_composite_connect); state[i]->req_params=smb_con; state[i]->mode=OPEN_CONNECTION; req1 = torture_connect_async( |