[Bro] BuildConnVal can create a dangling pointer
Robin Sommer
robin at icir.org
Mon Aug 27 10:15:32 PDT 2007
On Tue, Aug 21, 2007 at 20:16 -0700, you wrote:
> Looks like BuildConnVal() can be called from the connection destructor
> and will set the origin to "this" and thus create a dangling pointer.
Not sure I see that. Connection's dtor unrefs conn_val so this would
need to happen after the Unref(). The only line of code after the
Unref(conn_val) which could cause further connection events to be
raised is "delete root_analyzer" (although I think it shouldn't). If
that is indeed the case, I think the better fix is to move
Unref(conn_val) to the very end of the dtor.
Robin
--
Robin Sommer * Phone +1 (510) 931-5555 * robin at icir.org
LBNL/ICSI * Fax +1 (510) 666-2956 * www.icir.org
More information about the Bro
mailing list