1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

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
This commit is contained in:
Stefan Metzmacher 2009-07-29 21:41:34 +02:00 committed by Andrew Tridgell
parent 84810d7182
commit ac8aeec824

View File

@ -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);