libnet_join_set_machine_spn: simplify memory handling
authorIsaac Boukris <iboukris@gmail.com>
Wed, 18 Sep 2019 18:29:47 +0000 (21:29 +0300)
committerKarolin Seeger <kseeger@samba.org>
Tue, 5 Nov 2019 12:37:33 +0000 (12:37 +0000)
commit3f9a9b95dd1f128817a979e8687b480d6dc9cab1
tree7355159f2c16b07c5600e0525ec85241cf887086
parent2e7683c937e05085770e88cf48288f0404c28092
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