Wireshark mailing list archives

Re: register_tap_listener memleak


From: Jakub Zawadzki <darkjames-ws () darkjames pl>
Date: Fri, 16 Mar 2018 18:45:57 +0100

W dniu 2018-03-15 13:24, Peter Wu napisaƂ(a):
> I was looking at memleaks as reported by LSAN while running the
> decryption test suite, there are quite a number of occurrences.

Can register_tap_listener() return enum code (one of: success, not found,
wrong filter)?
You will get rid of memleak, and users will get nicely translated message
error.

That sounds like a great idea at first, but it seems not viable given
that the error messages are:

- "Tap <tapname parameter> not found"

<tapname parameter> is passed by caller, so caller should be able to show it in message error.

- "Filter "<fstring parameter>" is invalid - <dfilter_compile error>"

Ah, I only did notice <fstring parameter> which is also passed by caller,
didn't notice dfilter_compile_error thing :(

Would it be to big change to pass compiled dfilter to register_tap_listener()?
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
            mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: