[Bro-Dev] Memory Leak in find_all()?
Dirk Leinenbach
dirk.leinenbach at consistec.de
Tue Feb 2 08:48:14 PST 2016
Ok,
here we go (cf. attachment).
With my older state (2.3.XXX) of bro, all tests still are green after
the patch.
The patch applies cleanly also to the current git head, but there I
didn't execute the test suite.
Best regards,
Dirk
On 02.02.2016 17:21, Robin Sommer wrote:
>
> On Tue, Feb 02, 2016 at 16:33 +0100, you wrote:
>
>> Val* ma = new StringVal(n, (const char*) t);
>> a->Assign(ma, 0);
>> Unref(ma);
>> Is my observation correct?
> It is, good catch. Assign() take ownership of the value (0 in this
> case), but not of the index. Yes, please send a patch for this one and
> other instances you find. Thanks,
>
> Robin
>
--
Dr.-Ing. Dirk Leinenbach - Leitung Softwareentwicklung
consistec Engineering & Consulting GmbH
------------------------------------------------------------------
Europaallee 5 Fon: +49 (0)681 / 959044-0
D-66113 Saarbrücken Fax: +49 (0)681 / 959044-11
http://www.consistec.de e-mail: dirk.leinenbach at consistec.de
Registergericht: Amtsgericht Saarbrücken
Registerblatt: HRB12003
Geschäftsführer: Dr. Thomas Sinnwell, Volker Leiendecker, Stefan Sinnwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fix-memory-leaks-in-find_all-and-IRC-analyzer.patch
Type: text/x-patch
Size: 1357 bytes
Desc: not available
Url : http://mailman.icsi.berkeley.edu/pipermail/bro-dev/attachments/20160202/6e569a35/attachment.bin
More information about the bro-dev
mailing list