stream_terminate_connection: Prevent use-after-free
authorGarming Sam <garming@catalyst.net.nz>
Fri, 9 Jun 2017 02:13:25 +0000 (14:13 +1200)
committerGarming Sam <garming@samba.org>
Wed, 14 Jun 2017 23:24:25 +0000 (01:24 +0200)
commit2f045e7fc147aab2a4c7f356f0ce834f47cdff42
treef7a36d5c5f58bda082b8ece4595bee9f5fc956e9
parentb158f6832358be01f71d93111aa789d7941a835e
stream_terminate_connection: Prevent use-after-free

This sometimes would show up as corrupted bytes during logs. Hammering
the LDAP server enough times managed to trigger an outright segfault.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/smbd/service_stream.c