libnet_join_set_machine_spn: simplify memory handling
authorIsaac Boukris <iboukris@gmail.com>
Wed, 18 Sep 2019 18:29:47 +0000 (21:29 +0300)
committerRalph Boehme <slow@samba.org>
Fri, 25 Oct 2019 09:21:44 +0000 (09:21 +0000)
commitb8e1264ececf38681ca9a519a51e8336044673f0
tree12140a1ead350cf69fa6ffcd4f4caf27f45a8420
parent4cbad1eb46896bbd74c5b19dbb0a8937ffde90c2
libnet_join_set_machine_spn: simplify memory handling

and avoid a possible memory leak when passing null to
add_string_to_array() as mem_ctx.

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

Signed-off-by: Isaac Boukris <iboukris@redhat.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
source3/libnet/libnet_join.c