mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
gensec_krb5: Use kerberos_free_data_contents() to free krb5 data
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
8268501972
commit
739a7adaef
@ -641,7 +641,8 @@ static NTSTATUS gensec_krb5_update(struct gensec_security *gensec_security,
|
||||
} else {
|
||||
*out = data_blob_talloc(out_mem_ctx, outbuf.data, outbuf.length);
|
||||
}
|
||||
krb5_data_free(&outbuf);
|
||||
kerberos_free_data_contents(gensec_krb5_state->smb_krb5_context->krb5_context,
|
||||
&outbuf);
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
@ -820,7 +821,7 @@ static NTSTATUS gensec_krb5_wrap(struct gensec_security *gensec_security,
|
||||
}
|
||||
*out = data_blob_talloc(mem_ctx, output.data, output.length);
|
||||
|
||||
krb5_data_free(&output);
|
||||
kerberos_free_data_contents(context, &output);
|
||||
} else {
|
||||
return NT_STATUS_ACCESS_DENIED;
|
||||
}
|
||||
@ -851,7 +852,7 @@ static NTSTATUS gensec_krb5_unwrap(struct gensec_security *gensec_security,
|
||||
}
|
||||
*out = data_blob_talloc(mem_ctx, output.data, output.length);
|
||||
|
||||
krb5_data_free(&output);
|
||||
kerberos_free_data_contents(context, &output);
|
||||
} else {
|
||||
return NT_STATUS_ACCESS_DENIED;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user