[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
Hi Pavel,
> 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
unexpected.
BTW: what memory leak are you searching?
metze
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150513/9fcf1d45/attachment.pgp>
More information about the samba-technical
mailing list