[Snort-devel] frag3 preprocessor's small mem leak error

zhaohui yin yinzhaohui at ...2499...
Tue Nov 8 00:25:24 EST 2005


while I read the spp_frag3's code, find a small memory leak error.

  void Frag3Init(u_char *args)
 {
 line 842 context->bound_addrs = (IpAddrSet *) SnortAlloc(sizeof(IpAddrSet));
 which in the following call Frag3ParseArgs(), will
assign new IpAddrSet struct into  context->bound_addrs. it will lost a
 IpAddrSet struct.

since in Frag3ParseArgs() will fill the context->bound_addrs, line 842
should be delete.

--
yinzhaohui




More information about the Snort-devel mailing list