From 100b92b2cc09d291daf8d6074e915dbad084f907 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 13 Mar 2012 08:22:03 +0100 Subject: s3:torture: fix segfault in LOCAL-TALLOC-DICT talloc_dict_set() expects a pointer to an talloc'ed pointer. metze --- source3/torture/torture.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- cgit