mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
r25611: Smaller fix for winreg test.
Guenther (This used to be commit e9e6ee4f73c5ed88cbf4585aa7e1a40e06cc131f)
This commit is contained in:
parent
4fb9aeb556
commit
89f6f464ea
@ -181,7 +181,7 @@ static bool test_GetKeySecurity(struct dcerpc_pipe *p,
|
||||
struct security_descriptor **sd_out)
|
||||
{
|
||||
struct winreg_GetKeySecurity r;
|
||||
struct security_descriptor *sd;
|
||||
struct security_descriptor *sd = NULL;
|
||||
DATA_BLOB sdblob;
|
||||
|
||||
ZERO_STRUCT(r);
|
||||
@ -200,6 +200,8 @@ static bool test_GetKeySecurity(struct dcerpc_pipe *p,
|
||||
sdblob.data = r.out.sd->data;
|
||||
sdblob.length = r.out.sd->len;
|
||||
|
||||
sd = talloc_zero(tctx, struct security_descriptor);
|
||||
|
||||
torture_assert_ntstatus_ok(tctx,
|
||||
ndr_pull_struct_blob(&sdblob, tctx, sd,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_security_descriptor),
|
||||
@ -211,6 +213,8 @@ static bool test_GetKeySecurity(struct dcerpc_pipe *p,
|
||||
|
||||
if (sd_out) {
|
||||
*sd_out = sd;
|
||||
} else {
|
||||
talloc_free(sd);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user