summaryrefslogtreecommitdiff
path: root/lib/talloc
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-07-29 21:41:34 +0200
committerAndrew Tridgell <tridge@samba.org>2009-08-24 16:29:57 +1000
commitac8aeec824b49c69a97e107f170337fcaa75120f (patch)
treeacced4dfdffd11598084ff98d3b8e2d04afb55e2 /lib/talloc
parent84810d7182f2d9b3f4cb65db89489cb0a75dcc2e (diff)
downloadsamba-ac8aeec824b49c69a97e107f170337fcaa75120f.tar.gz
samba-ac8aeec824b49c69a97e107f170337fcaa75120f.tar.bz2
samba-ac8aeec824b49c69a97e107f170337fcaa75120f.zip
talloc: let talloc_steal() only generate a warning if it's used with references
We have to many callers, which rely on that talloc_steal() never fails. metze
Diffstat (limited to 'lib/talloc')
-rw-r--r--lib/talloc/talloc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c
index a0065bccab..64037b52cf 100644
--- a/lib/talloc/talloc.c
+++ b/lib/talloc/talloc.c
@@ -688,14 +688,13 @@ void *_talloc_steal_loc(const void *new_ctx, const void *ptr, const char *locati
if (unlikely(tc->refs != NULL) && talloc_parent(ptr) != new_ctx) {
struct talloc_reference_handle *h;
#if DEVELOPER
- fprintf(stderr, "ERROR: talloc_steal with references at %s\n", location);
+ fprintf(stderr, "WARNING: talloc_steal with references at %s\n", location);
#endif
for (h=tc->refs; h; h=h->next) {
#if DEVELOPER
fprintf(stderr, "\treference at %s\n", h->location);
#endif
}
- return NULL;
}
return _talloc_steal_internal(new_ctx, ptr);