git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
51fc8b8
)
Revert "TODO: talloc: talloc_free() should remove the reference to the current owner"
author
Stefan Metzmacher
<metze@samba.org>
Thu, 9 Jul 2009 08:54:23 +0000
(10:54 +0200)
committer
Stefan Metzmacher
<metze@samba.org>
Thu, 9 Jul 2009 08:54:23 +0000
(10:54 +0200)
This reverts commit
1901ff9942837e9cad22269b16b33a6af3df92a9
.
lib/talloc/talloc.c
patch
|
blob
|
history
diff --git
a/lib/talloc/talloc.c
b/lib/talloc/talloc.c
index 1a316d6d58ded63c0af672ae80a9784db95d9554..33cbfd7d268dc737e95948c44575ac6c53d835d7 100644
(file)
--- a/
lib/talloc/talloc.c
+++ b/
lib/talloc/talloc.c
@@
-510,13
+510,9
@@
static inline int _talloc_free(void *ptr)
* pointer.
*/
is_child = talloc_is_parent(tc->refs, ptr);
+ _talloc_free(tc->refs);
if (is_child) {
- _talloc_free(tc->refs);
return _talloc_free(ptr);
- } else {
- /* the first reference becomes the owner */
- _talloc_steal(talloc_parent(tc->refs), ptr);
- _talloc_free(tc->refs);
}
return -1;
}