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

tests: Memory leak in T103pdu_parse_clib.c:13 #722

Open
moshekaplan opened this issue Oct 9, 2023 · 0 comments
Open

tests: Memory leak in T103pdu_parse_clib.c:13 #722

moshekaplan opened this issue Oct 9, 2023 · 0 comments

Comments

@moshekaplan
Copy link
Contributor

~/Desktop/net-snmp/testing$ ASAN_OPTIONS="detect_leaks=1:print_cmdline=1"  ./RUNFULLTESTS -v -g "unit-tests" -r 103
Parsing of PDUs .. 

=================================================================
==293013==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 1136 byte(s) in 1 object(s) allocated from:
    #0 0x7f7cdf6de9a7 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:77
    #1 0x7f7cddb43ae2 in snmp_pdu_parse /home/user/Desktop/net-snmp/snmplib/snmp_api.c:4795
    #2 0x562a172d643c in main /home/user/Desktop/net-snmp/testing/fulltests/unit-tests/T103pdu_parse_clib.c:13
    #3 0x7f7cdd023a8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

SUMMARY: AddressSanitizer: 1136 byte(s) leaked in 1 allocation(s).
No subtests run 

Test Summary Report
-------------------
Parsing of PDUs (Wstat: 0 Tests: 0 Failed: 0)
  Parse errors: No plan found in TAP output
Files=1, Tests=0,  0 wallclock secs ( 0.01 usr  0.00 sys +  0.09 cusr  0.06 csys =  0.16 CPU)
Result: FAIL
@moshekaplan moshekaplan changed the title tests: Memory leak in T011snmp_old_api_registration_cagentlib.c:14 tests: Memory leak in T103pdu_parse_clib.c:13 Oct 9, 2023
moshekaplan added a commit to moshekaplan/net-snmp that referenced this issue Nov 7, 2023
Fixes issue net-snmp#722 , by free()ing parsed PDU
bvanassche pushed a commit that referenced this issue Nov 11, 2023
Fixes issue #722 , by free()ing parsed PDU
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

1 participant