From: Aliaksei Karaliou Date: Fri, 21 Dec 2018 13:47:00 +0000 (+0300) Subject: s4:torture:base:bench-readwrite: fix uninitialized memory causing segfault X-Git-Tag: tdb-1.3.17~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=facd6f2daf6df0f9c82bcbe36946507736e9648c;p=thirdparty%2Fsamba.git 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 Reviewed-by: Douglas Bagnall Reviewed-by: Jeremy Allison --- 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(