memory leak -- comments?
Mikhail Kshevetskiy
kl at laska.dorms.spbu.ru
Fri Dec 16 00:00:54 GMT 2005
On Thu, 15 Dec 2005 15:48:17 -0800
Jeremy Allison <jra at samba.org> wrote:
> On Thu, Dec 15, 2005 at 06:39:01PM -0500, derrell at samba.org wrote:
> > Hi Jeremy,
> >
> > I received the attached report, including valgrind output. It looks to me
> > as if cli_receive_trans() allocates 'param' and 'data', and then, back in
> > cli_list_new(), if one of these three conditions is true, we'll have a
> > memory leak:
> >
> > if (cli_is_error_cli(cli) || !rdata || !rparam)
> >
> > or
> >
> > if (ff_searchcount == 0)
> >
> > or
> > if (!tdl) /* malloc failed)
> >
> > Of these, the one likely to occur is ff_searchcount == 0. I suspect that
> > was the cause of this report. Agree? Each of these cases should be
> > SAFE_FREE()ing rdata and rparam, right?
>
> Here's the patch.
>
> Jeremy.
Thanks, it help to me.
The patch fix the problem.
Mikhail Kshevetskiy
More information about the samba-technical
mailing list