s3: RPC: Don't crash on trying to talloc_free(-1) if smb_iconv_open_ex() fails.
commit20d61b9c543944c1d292d7829a6ce14a3f31d491
authorJeremy Allison <jra@samba.org>
Wed, 6 May 2020 19:36:00 +0000 (6 12:36 -0700)
committerKarolin Seeger <kseeger@samba.org>
Thu, 14 May 2020 07:25:46 +0000 (14 07:25 +0000)
treeced751d67933e27c9407403921279b05bba4d911
parent43bc61b1c799470bb87f99ad4401aa77fb17e901
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

(cherry picked from commit 14df5d20a8ec00bf8627732284f427f6463177e3)
source3/rpc_server/mdssvc/mdssvc.c