summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-03-13 08:22:03 +0100
committerStefan Metzmacher <metze@samba.org>2012-03-13 08:26:35 +0100
commit100b92b2cc09d291daf8d6074e915dbad084f907 (patch)
tree7becd4fb4e1b0cc10cf06f108e02842473c89c74 /source3/torture
parent57ddd38c1a7791093531217a3adb15484c74f18c (diff)
downloadsamba-100b92b2cc09d291daf8d6074e915dbad084f907.tar.gz
samba-100b92b2cc09d291daf8d6074e915dbad084f907.tar.bz2
samba-100b92b2cc09d291daf8d6074e915dbad084f907.zip
s3:torture: fix segfault in LOCAL-TALLOC-DICT
talloc_dict_set() expects a pointer to an talloc'ed pointer. metze
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/torture.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 159dc0bd0c..e2a2744dae 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -7971,6 +7971,7 @@ static bool run_local_talloc_dict(int dummy)
struct talloc_dict *dict;
struct talloc_dict_test *t;
int key, count, res;
+ bool ok;
dict = talloc_dict_init(talloc_tos());
if (dict == NULL) {
@@ -7984,7 +7985,8 @@ static bool run_local_talloc_dict(int dummy)
key = 1;
t->content = 1;
- if (!talloc_dict_set(dict, data_blob_const(&key, sizeof(key)), t)) {
+ ok = talloc_dict_set(dict, data_blob_const(&key, sizeof(key)), &t);
+ if (!ok) {
return false;
}