[PATCH] Use talloc_autofree_context() to allocate global memory

Volker Lendecke Volker.Lendecke at SerNet.DE
Mon Sep 8 12:37:12 MDT 2014

On Mon, Sep 08, 2014 at 02:22:30PM +0200, Kamen Mazdrashki wrote:
> Hi,
> Please find attached several patches to move global structure off of NULL
> context into autofree context.
> I have hit those while running unit tests in Openchange.
> Strictly speaking, patch 0002 is not needed as the caller for this function
> uses the memory returned and frees it immediately - we have only 1 caller
> at the moment.
> Nevertheless, we can't assume what the caller of
> debug_list_class_names_and_levels()
> is going to do and hence this patch. May be it will be good if we pass
> memory context explicitly?

Yes, please do that. I had that on the list when working on
the debug system a few weeks ago, but then forgot to do it.
I'm not so sure about the other patches, but
debug_list_class_names_and_levels definitely needs to be
passed a memory context.


SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de

More information about the samba-technical mailing list