tcpdump mailing list archives

libpcap patches for DLT_SITA support


From: "Fulko Hew" <fulko.hew () gmail com>
Date: Mon, 7 Jan 2008 15:05:45 -0500

On Jan 6, 2008 3:40 PM, Guy Harris <guy () alum mit edu> wrote:

... snip ...

There are still some warnings:

./pcap-sita.c: In function 'acn_findalldevs':
./pcap-sita.c:415: warning: 'port' may be used uninitialized in this
function
./pcap-sita.c :414: warning: 'proto' may be used uninitialized in this
function
./pcap-sita.c: At top level:
./pcap-sita.c:77: warning: 'errorString' defined but not used
./pcap-sita.c:86: warning: 'dump_interface_list' defined but not used
./pcap-sita.c:127: warning: 'dump_interface_list_p' defined but not used
./pcap-sita.c:147: warning: 'dump_unit_table' defined but not used
./pcap-sita.c:234: warning: 'find_nth_interface_name' defined but not used

./pcap-sita.c:375: warning: 'acn_freealldevs' defined but not used

Does the fact that acn_freealldevs() isn't used mean that memory might
leak?


No.  Upon reflection (although I'm still chasing my other issue)...
these routines were all test routines.

I had built a harness to easily debug/test my changes and enhancements
without having to rebuild wireshark (primarily my SITA interface discovery
mechanism) .  And in order to allow me to (easily) re-run the tests, I
needed a routine like acn_freealldevs() to allow the harness to
clean_up after itself.  In retrospect, the kernel closes all open sockets
upon normal exit, but I decided to do it the friendly way.

In conclusion, no... not being called does not infer a potential memory
leak.

But as previously mentioned, I am pursuing a different situation where
some sockets are not closed, but this only 'appears to' happen
when run on certain Linux kernels.
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: