mirror of
https://github.com/samba-team/samba.git
synced 2025-01-25 06:04:04 +03:00
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>
This commit is contained in:
parent
24cfa0baf5
commit
facd6f2daf
@ -931,8 +931,8 @@ bool run_benchrw(struct torture_context *tctx)
|
|||||||
switch (state[i]->mode){
|
switch (state[i]->mode){
|
||||||
/*open multiple connections with the same userid */
|
/*open multiple connections with the same userid */
|
||||||
case START:
|
case START:
|
||||||
smb_con = talloc(
|
smb_con = talloc_zero(
|
||||||
tctx,struct smb_composite_connect) ;
|
tctx,struct smb_composite_connect);
|
||||||
state[i]->req_params=smb_con;
|
state[i]->req_params=smb_con;
|
||||||
state[i]->mode=OPEN_CONNECTION;
|
state[i]->mode=OPEN_CONNECTION;
|
||||||
req1 = torture_connect_async(
|
req1 = torture_connect_async(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user