Kismet Wireless

Kismet Forums


Posted by:dragorn
Subject:memory leak or maybe redundant code
Date:14:04:14 25/09/2009

> We've received the following report from a reporter:
> ------
> I just had a look at factory package kismet-2009_06_R1-2.1
> For source code file kismet-2009-06-R1/ around line
> 240, function Dumpfile_Tuntap::OpenTuntap, is the following code
> ipc_dft_open *dfto = new ipc_dft_open;
> but I fail to detect a matching call to delete. This looks like a memory
> leak to me. I also notice that the only thing that happens
> to local variable dfto is
> dfto->tapdevice[0] = 0;
> so it may be the case that dfto is a candidate for removal.

It probably should have been a cast to the internals of the ipc packet.

In any case, it happens exactly once - during tuntap buildup - so it'll be fixed the next time I'm doing another SVN commit, thanks, but it's not really leaking anything noticeable (it's not being called more than once). The fix will probably make the next release. That packet is used to indicate to the parent that an out-of-band IPC packet containing the FD of the tuntap, so it's a one-shot.

Still, good catch.


Reply to this message