git.samba.org
/
sfrench
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57ddd38
)
s3:torture: fix segfault in LOCAL-TALLOC-DICT
author
Stefan Metzmacher
<metze@samba.org>
Tue, 13 Mar 2012 07:22:03 +0000
(08:22 +0100)
committer
Stefan Metzmacher
<metze@samba.org>
Tue, 13 Mar 2012 07:26:35 +0000
(08:26 +0100)
talloc_dict_set() expects a pointer to an talloc'ed pointer.
metze
source3/torture/torture.c
patch
|
blob
|
history
diff --git
a/source3/torture/torture.c
b/source3/torture/torture.c
index 159dc0bd0c914318038ddc43bf14dafecdf36ede..e2a2744daecaa3406bacc087603c5bfc22ba48e7 100644
(file)
--- 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;
}