-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
zebra: Free up leaked memory in zebra_ptm.c #5659
Conversation
ERROR: LeakSanitizer: detected memory leaks Direct leak of 16416 byte(s) in 1 object(s) allocated from: #0 0x7f08e3ca8602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602) #1 0x7f08e389c4b0 in qmalloc lib/memory.c:105 #2 0x7f08e38e87b4 in stream_new lib/stream.c:106 #3 0x481d7f in _zebra_ptm_bfd_client_deregister zebra/zebra_ptm.c:1348 #4 0x4e7b84 in hook_call_zserv_client_close zebra/zserv.c:544 #5 0x4e7b84 in zserv_client_free zebra/zserv.c:560 #6 0x4e7b84 in zserv_close_client zebra/zserv.c:625 #7 0x4e7fe0 in zserv_handle_client_fail zebra/zserv.c:638 #8 0x7f08e3901995 in thread_call lib/thread.c:1549 #9 0x7f08e38937d7 in frr_run lib/libfrr.c:1093 #10 0x41686e in main zebra/main.c:470 #11 0x7f08e2fe682f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) Direct leak of 16416 byte(s) in 1 object(s) allocated from: #0 0x7f08e3ca8602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602) #1 0x7f08e389c4b0 in qmalloc lib/memory.c:105 #2 0x7f08e38e87b4 in stream_new lib/stream.c:106 #3 0x481efe in _zebra_ptm_reroute zebra/zebra_ptm.c:1411 #4 0x4f7dc9 in zserv_handle_commands zebra/zapi_msg.c:2642 #5 0x4e6d32 in zserv_process_messages zebra/zserv.c:517 #6 0x7f08e3901995 in thread_call lib/thread.c:1549 #7 0x7f08e38937d7 in frr_run lib/libfrr.c:1093 #8 0x41686e in main zebra/main.c:470 #9 0x7f08e2fe682f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) SUMMARY: AddressSanitizer: 32832 byte(s) leaked in 2 allocation(s). This commit fixes these two different leaks. Fixes: FRRouting#5658 Signed-off-by: Donald Sharp <[email protected]>
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopology tests on Ubuntu 18.04 amd64: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOU1804-10357/test Topology Tests failed for Topology tests on Ubuntu 18.04 amd64:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-10357/artifact/TOPOU1804/ErrorLog/log_topotests.txt CentOS 7 rpm pkg check: Failed (click for details)CentOS 7 rpm pkg check: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-10357/artifact/CENTOS7RPM/ErrorLog/log_package_start.txt CentOS 7 rpm pkg check: No useful log foundUbuntu 16.04 deb pkg check: Failed (click for details)Ubuntu 16.04 deb pkg check: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-10357/artifact/U1604DEBTEST/ErrorLog/log_package_start.txt Ubuntu 16.04 deb pkg check: No useful log foundTopotest tests on Ubuntu 16.04 i386: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOI386-10357/test Topology Tests failed for Topotest tests on Ubuntu 16.04 i386 Fedora 29 rpm pkg check: Failed (click for details)Fedora 29 rpm pkg check: Unknown Log URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-10357/artifact/F29RPMCHECK/ErrorLog/log_package_start.txt Fedora 29 rpm pkg check: No useful log foundTopology tests on Ubuntu 16.04 amd64: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOU1604-10357/test Topology Tests failed for Topology tests on Ubuntu 16.04 amd64:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-10357/artifact/TOPOU1604/ErrorLog/log_topotests.txt Successful on other platforms
Topology Tests memory analysis: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-10357/artifact/TOPOU1804/MemoryLeaks/ Warnings Generated during build:Debian 10 amd64 build: Successful with additional warningsDebian Package lintian failed for Debian 10 amd64 build:
clang_check |
ERROR: LeakSanitizer: detected memory leaks
Direct leak of 16416 byte(s) in 1 object(s) allocated from:
#0 0x7f08e3ca8602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
#1 0x7f08e389c4b0 in qmalloc lib/memory.c:105
#2 0x7f08e38e87b4 in stream_new lib/stream.c:106
#3 0x481d7f in _zebra_ptm_bfd_client_deregister zebra/zebra_ptm.c:1348
#4 0x4e7b84 in hook_call_zserv_client_close zebra/zserv.c:544
#5 0x4e7b84 in zserv_client_free zebra/zserv.c:560
#6 0x4e7b84 in zserv_close_client zebra/zserv.c:625
#7 0x4e7fe0 in zserv_handle_client_fail zebra/zserv.c:638
#8 0x7f08e3901995 in thread_call lib/thread.c:1549
#9 0x7f08e38937d7 in frr_run lib/libfrr.c:1093
#10 0x41686e in main zebra/main.c:470
#11 0x7f08e2fe682f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
Direct leak of 16416 byte(s) in 1 object(s) allocated from:
#0 0x7f08e3ca8602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
#1 0x7f08e389c4b0 in qmalloc lib/memory.c:105
#2 0x7f08e38e87b4 in stream_new lib/stream.c:106
#3 0x481efe in _zebra_ptm_reroute zebra/zebra_ptm.c:1411
#4 0x4f7dc9 in zserv_handle_commands zebra/zapi_msg.c:2642
#5 0x4e6d32 in zserv_process_messages zebra/zserv.c:517
#6 0x7f08e3901995 in thread_call lib/thread.c:1549
#7 0x7f08e38937d7 in frr_run lib/libfrr.c:1093
#8 0x41686e in main zebra/main.c:470
#9 0x7f08e2fe682f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
SUMMARY: AddressSanitizer: 32832 byte(s) leaked in 2 allocation(s).
This commit fixes these two different leaks.
Fixes: #5658
Signed-off-by: Donald Sharp [email protected]