libcli:smb2: Use talloc NULL context if we don't have a stackframe
authorAndreas Schneider <asn@samba.org>
Mon, 13 Jul 2020 15:23:37 +0000 (17:23 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 19 Aug 2020 16:22:40 +0000 (16:22 +0000)
commit46142d8398dac98046866ab06ff3185f4311ab8d
tree87c3736fd52d065cb92fb478d121254207408c93
parentcf432bd4527a1605e48783c54c01b0ff518ba371
libcli:smb2: Use talloc NULL context if we don't have a stackframe

If we execute this code from python we don't have a talloc stackframe
around and segfault with talloc_tos().

To fix the crash we use the NULL context as we take care for freeing the
memory as soon as possible.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
libcli/smb/smb2_signing.c