summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/winreg.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2007-10-10 13:50:21 +0200
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:42:52 +0100
commit89f6f464eab10ae41b022a77dbfa01cdfde23c4e (patch)
treeeff02abe57f6b05075878f1f040e792abfa54bd9 /source4/torture/rpc/winreg.c
parent4fb9aeb55650bdd10288870dd9c4e1567f73a3f8 (diff)
downloadsamba-89f6f464eab10ae41b022a77dbfa01cdfde23c4e.tar.gz
samba-89f6f464eab10ae41b022a77dbfa01cdfde23c4e.tar.bz2
samba-89f6f464eab10ae41b022a77dbfa01cdfde23c4e.zip
r25611: Smaller fix for winreg test.
Guenther (This used to be commit e9e6ee4f73c5ed88cbf4585aa7e1a40e06cc131f)
Diffstat (limited to 'source4/torture/rpc/winreg.c')
-rw-r--r--source4/torture/rpc/winreg.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index e85ebb3e05..0a1c0a7bad 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -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;