summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
73a16d0)
TODO: talloc: talloc_free() should remove the reference to the current owner
The parent of the first reference becomes the owner...
metze
Signed-off-by: Sam Liddicott <sam@liddicott.com>
* pointer.
*/
is_child = talloc_is_parent(tc->refs, ptr);
* pointer.
*/
is_child = talloc_is_parent(tc->refs, ptr);
- _talloc_free(tc->refs);
+ _talloc_free(tc->refs);
return _talloc_free(ptr);
return _talloc_free(ptr);
+ } else {
+ /* the first reference becomes the owner */
+ _talloc_steal(talloc_parent(tc->refs), ptr);
+ _talloc_free(tc->refs);