Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential memory leak in nsock/src/nsock_pcap.c #2609

Closed
icy17 opened this issue Feb 3, 2023 · 0 comments
Closed

Potential memory leak in nsock/src/nsock_pcap.c #2609

icy17 opened this issue Feb 3, 2023 · 0 comments
Labels

Comments

@icy17
Copy link

icy17 commented Feb 3, 2023

Potential memory leak in nsock_pcap.c line 114. Calling pcap_compile() without calling pcap_freecode() to free the memory will cause a memory leak.
Doc says "pcap_freecode() is used to free up allocated memory pointed to by a bpf_program struct generated by pcap_compile(3PCAP) when that BPF program is no longer needed, for example after it has been made the filter program for a pcap structure by a call to pcap_setfilter(3PCAP)."

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant