[PATCH] ldb: check result of talloc_get_type in ldb_search_default_callback
Stefan (metze) Metzmacher
metze at samba.org
Wed May 13 06:00:49 MDT 2015
> while trying to find out memory leak using talloc_set_name() (which
> turned out not be a good idea at all) I got segfault from
> ldb_search_default_callback() caused by dereferencing NULL pointer (res).
> I understand that returned value of talloc_get_type() is not checked for
> NULL often and now I'm also aware of problems connected to using
> talloc_set_name(). However, in my opinion segfault should not happen in
> any case.
What values of req->context did you see?
I'd assume talloc_get_type_abort() would the correct thing todo
as it seems to be a programmer error to fill req->context with something
BTW: what memory leak are you searching?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 198 bytes
Desc: OpenPGP digital signature
More information about the samba-technical