trustdom_keystr leaks memory
Tim Potter
tpot at samba.org
Sat Jul 19 06:23:37 GMT 2003
On Fri, Jul 18, 2003 at 12:16:14PM +0200, Volker Lendecke wrote:
> Attached is a patch that fixes a memleak. I did not commit it right away
> as I don't really understand why we call asprintf here and never free
> the result. All the callers of trustdom_keystr call into tdb and
> immediately drop the result again.
>
> Is this ok?
This patch is OK. By convention keystrs like this are supposed to
be returned as a pointer to a static buffer so the caller doesn't
have to worry about freeing it.
Tim.
More information about the samba-technical
mailing list