s3: RPC: Don't crash on trying to talloc_free(-1) if smb_iconv_open_ex() fails.
authorJeremy Allison <jra@samba.org>
Wed, 6 May 2020 19:36:00 +0000 (12:36 -0700)
committerRalph Boehme <slow@samba.org>
Thu, 7 May 2020 18:03:16 +0000 (18:03 +0000)
commit14df5d20a8ec00bf8627732284f427f6463177e3
treea292ef6819b24c5b748238e958f7a877fbcdf0de
parent155883e85c9ef53bde3c294296ccec4ed5a9d0a5
s3: RPC: Don't crash on trying to talloc_free(-1) if smb_iconv_open_ex() fails.

Assign output from smb_iconv_open_ex() to a temporary
handle. Only assign to mds_ctx->[handles] if correctly
opened otherwise we end up trying to call smb_iconv_close(-1).

MacOSX Catalina triggers this.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14372

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu May  7 18:03:16 UTC 2020 on sn-devel-184
source3/rpc_server/mdssvc/mdssvc.c