mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s4:torture: Check return values of talloc functions
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
52fd0d79ab
commit
cf30ddb56d
@ -264,15 +264,26 @@ static DATA_BLOB *create_access_check(struct torture_context *tctx,
|
||||
bool broken,
|
||||
uint32_t version)
|
||||
{
|
||||
TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
|
||||
DATA_BLOB *blob = talloc_zero(mem_ctx, DATA_BLOB);
|
||||
TALLOC_CTX *tmp_ctx = NULL;
|
||||
DATA_BLOB *blob = NULL;
|
||||
enum ndr_err_code ndr_err;
|
||||
const struct dom_sid *sid = get_user_sid(tctx, tmp_ctx, user);
|
||||
const struct dom_sid *sid = NULL;
|
||||
|
||||
tmp_ctx = talloc_new(mem_ctx);
|
||||
if (tmp_ctx == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
sid = get_user_sid(tctx, tmp_ctx, user);
|
||||
if (sid == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
blob = talloc_zero(mem_ctx, DATA_BLOB);
|
||||
if (blob == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (version == 2) {
|
||||
struct bkrp_access_check_v2 access_struct;
|
||||
gnutls_hash_hd_t dig_ctx;
|
||||
|
Loading…
Reference in New Issue
Block a user