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:
parent
57ddd38c1a
commit
100b92b2cc
@ -7971,6 +7971,7 @@ static bool run_local_talloc_dict(int dummy)
|
|||||||
struct talloc_dict *dict;
|
struct talloc_dict *dict;
|
||||||
struct talloc_dict_test *t;
|
struct talloc_dict_test *t;
|
||||||
int key, count, res;
|
int key, count, res;
|
||||||
|
bool ok;
|
||||||
|
|
||||||
dict = talloc_dict_init(talloc_tos());
|
dict = talloc_dict_init(talloc_tos());
|
||||||
if (dict == NULL) {
|
if (dict == NULL) {
|
||||||
@ -7984,7 +7985,8 @@ static bool run_local_talloc_dict(int dummy)
|
|||||||
|
|
||||||
key = 1;
|
key = 1;
|
||||||
t->content = 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user