[Bro-Dev] Memory Leak in find_all()?

Robin Sommer robin at icir.org
Tue Feb 2 08:21:57 PST 2016



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

-- 
Robin Sommer * ICSI/LBNL * robin at icir.org * www.icir.org/robin


More information about the bro-dev mailing list