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 #84

Open
0xAlcibiades opened this issue Apr 5, 2024 · 1 comment
Open

Potential memory leak #84

0xAlcibiades opened this issue Apr 5, 2024 · 1 comment

Comments

@0xAlcibiades
Copy link

Seen on debian 12 kernel 6.13 signed from backports, amd64 architecture

clang --analyze -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi libbpftune.c bpftune.c tcp_buffer_tuner.c route_table_tuner.c neigh_table_tuner.c sysctl_tuner.c tcp_conn_tuner.c netns_tuner.c net_buffer_tuner.c ip_frag_tuner.c
warning: Path diagnostic report is not generated. Current output format does not support diagnostics that cross file boundaries. Refer to --analyzer-output for valid output formats
warning: Path diagnostic report is not generated. Current output format does not support diagnostics that cross file boundaries. Refer to --analyzer-output for valid output formats
warning: Path diagnostic report is not generated. Current output format does not support diagnostics that cross file boundaries. Refer to --analyzer-output for valid output formats
In file included from libbpftune.c:57:
./probe.skel.h:217:2: warning: Potential leak of memory pointed to by 's' [unix.Malloc]
        return err;
        ^~~~~~~~~~
In file included from libbpftune.c:58:
./probe.skel.legacy.h:211:2: warning: Potential leak of memory pointed to by 's' [unix.Malloc]
        return err;
        ^~~~~~~~~~
In file included from libbpftune.c:59:
./probe.skel.nobtf.h:211:2: warning: Potential leak of memory pointed to by 's' [unix.Malloc]
        return err;
        ^~~~~~~~~~
3 warnings generated.
@alan-maguire
Copy link
Member

see #23 this seems to be a false positive; it originates in the generated "BPF skeleton" header file

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

No branches or pull requests

2 participants