1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

s3:torture: fix segfault in LOCAL-TALLOC-DICT

talloc_dict_set() expects a pointer to an talloc'ed pointer.

metze
This commit is contained in:
Stefan Metzmacher 2012-03-13 08:22:03 +01:00
parent 57ddd38c1a
commit 100b92b2cc

View File

@ -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;
}