mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
dsdb:cracknames: free more on error (CID 240724)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Jennifer Sutton <josutton@catalyst.net.nz> Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org> Autobuild-Date(master): Wed Aug 28 05:39:36 UTC 2024 on atb-devel-224
This commit is contained in:
parent
3f83d029de
commit
b5e0e83150
@ -307,11 +307,14 @@ static WERROR DsCrackNameUPN(struct ldb_context *sam_ctx, TALLOC_CTX *mem_ctx,
|
|||||||
realm = smb_krb5_principal_get_realm(
|
realm = smb_krb5_principal_get_realm(
|
||||||
mem_ctx, smb_krb5_context->krb5_context, principal);
|
mem_ctx, smb_krb5_context->krb5_context, principal);
|
||||||
if (realm == NULL) {
|
if (realm == NULL) {
|
||||||
|
krb5_free_principal(smb_krb5_context->krb5_context, principal);
|
||||||
return WERR_NOT_ENOUGH_MEMORY;
|
return WERR_NOT_ENOUGH_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
realm_encoded = ldb_binary_encode_string(mem_ctx, realm);
|
realm_encoded = ldb_binary_encode_string(mem_ctx, realm);
|
||||||
if (realm_encoded == NULL) {
|
if (realm_encoded == NULL) {
|
||||||
|
TALLOC_FREE(realm);
|
||||||
|
krb5_free_principal(smb_krb5_context->krb5_context, principal);
|
||||||
return WERR_NOT_ENOUGH_MEMORY;
|
return WERR_NOT_ENOUGH_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user