Skip to content

s3:modules - fix read of uninitialized memory

Valgrind flagged issue. Fix is fairly trivial.

==32512== Invalid read of size 8
==32512==    at 0xA5018F5: glfs_clear_preopened (vfs_glusterfs.c:145)
==32512==    by 0xA5018F5: vfs_gluster_disconnect (vfs_glusterfs.c:514)
==32512==    by 0x49095B4: close_cnum (smb2_service.c:969)
==32512==    by 0x493C77F: smbXsrv_tcon_disconnect (smbXsrv_tcon.c:929)
==32512==    by 0x49205C0: smbd_smb2_tdis_wait_done (smb2_tcon.c:665)
==32512==    by 0x4BDBA61: tevent_common_invoke_immediate_handler (tevent_immediate.c:190)
==32512==    by 0x4BDBA89: tevent_common_loop_immediate (tevent_immediate.c:236)
==32512==    by 0x4BE18BB: epoll_event_loop_once (tevent_epoll.c:919)
==32512==    by 0x4BDFC26: std_event_loop_once (tevent_standard.c:114)
==32512==    by 0x4BDA8A3: _tevent_loop_once (tevent.c:828)
==32512==    by 0x4BDAB8A: tevent_common_loop_wait (tevent.c:951)
==32512==    by 0x4BDFBC6: std_event_loop_wait (tevent_standard.c:145)
==32512==    by 0x49072DF: smbd_process (smb2_process.c:2015)

Checklist

  • Commits have Signed-off-by: with name/author being identical to the commit author
  • (optional) This MR is just one part towards a larger feature.
  • (optional, if backport required) Bugzilla bug filed and BUG: tag added
  • Test suite updated with functionality tests
  • Test suite updated with negative tests
  • Documentation updated
  • CI timeout is 3h or higher (see Settings/CICD/General pipelines/ Timeout)

Reviewer's checklist:

  • There is a test suite reasonably covering new functionality or modifications
  • Function naming, parameters, return values, types, etc., are consistent and according to README.Coding.md
  • This feature/change has adequate documentation added
  • No obvious mistakes in the code

Merge request reports