Use 'goto done' instead of 'return' to fix machine_escaped leak.
Signed-off-by: Jones Syue <jonessyue@qnap.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Nov 4 22:48:50 UTC 2019 on sn-devel-184
/* Make sure to NULL terminate the array */
spn_array = talloc_realloc(ctx, spn_array, const char *, num_spns + 1);
if (spn_array == NULL) {
/* Make sure to NULL terminate the array */
spn_array = talloc_realloc(ctx, spn_array, const char *, num_spns + 1);
if (spn_array == NULL) {
- return ADS_ERROR_LDAP(LDAP_NO_MEMORY);
+ ret = ADS_ERROR(LDAP_NO_MEMORY);
+ goto done;
}
spn_array[num_spns] = NULL;
}
spn_array[num_spns] = NULL;