memory leak -- comments?

derrell at samba.org derrell at samba.org
Thu Dec 15 23:39:01 GMT 2005


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?

Derrell

-------------- next part --------------
An embedded message was scrubbed...
From: Mikhail Kshevetskiy <kl at laska.dorms.spbu.ru>
Subject: Re: [Bug 3273] memory leak in libsmbclient and long share names
Date: Fri, 16 Dec 2005 02:23:28 +0300
Size: 5066
Url: http://lists.samba.org/archive/samba-technical/attachments/20051215/10145691/attachment.eml


More information about the samba-technical mailing list