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

Memory leak in _webui_get_file_name_from_url #464

Closed
studokim opened this issue Aug 1, 2024 · 1 comment
Closed

Memory leak in _webui_get_file_name_from_url #464

studokim opened this issue Aug 1, 2024 · 1 comment

Comments

@studokim
Copy link

studokim commented Aug 1, 2024

WebUI v2.4.2:

=================================================================
==461941==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 32 byte(s) in 3 object(s) allocated from:
    #0 0x6010a3b9f1ca in strdup llvmSrc/compiler-rt/lib/asan/asan_interceptors.cpp:570:3
    #1 0x6010a3de384c in _webui_get_file_name_from_url /src/webui.c:3009:18 _webui_get_file_name_from_url strdup
    #2 0x6010a3de38e8 in _webui_get_full_path_from_url src/webui.c:3032:18 _webui_get_full_path_from_url
    #3 0x6010a3de34b6 in _webui_serve_file src/webui.c:3116:27
    #4 0x6010a3de2314 in _webui_http_handler src/webui.c:6553:36
    #5 0x6010a3e1a61c in handle_request src/civetweb/civetweb.c:15224:8
    #6 0x6010a3e17134 in handle_request_stat_log src/civetweb/civetweb.c:6659:2
    #7 0x6010a3e14b0f in process_new_connection src/civetweb/civetweb.c:19705:5
    #8 0x6010a3e1334b in worker_thread_run src/civetweb/civetweb.c:20128:4
    #9 0x6010a3e126ec in worker_thread src/civetweb/civetweb.c:20189:2
    #10 0x6010a3bb3608 in asan_thread_start(void*) llvmSrc/compiler-rt/lib/asan/asan_interceptors.cpp:239:28

WebUI v2.5.0-beta.2:

=================================================================
==511254==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 32 byte(s) in 3 object(s) allocated from:
    #0 0x63c71e9df64a in strdup llvmSrc/compiler-rt/lib/asan/asan_interceptors.cpp:570:3
    #1 0x63c71ebc6d7c in _webui_get_file_name_from_url src/webui.c:4089:18
    #2 0x63c71ebc57d1 in _webui_serve_file src/webui.c:4259:18
    #3 0x63c71ebc371e in _webui_http_handler src/webui.c:8053:40
    #4 0x63c71ec0591c in handle_request src/civetweb/civetweb.c:15240:8
    #5 0x63c71ec02434 in handle_request_stat_log src/civetweb/civetweb.c:6665:2
    #6 0x63c71ebffe0f in process_new_connection src/civetweb/civetweb.c:19754:5
    #7 0x63c71ebfe64b in worker_thread_run src/civetweb/civetweb.c:20194:4
    #8 0x63c71ebfd9ec in worker_thread src/civetweb/civetweb.c:20255:2
    #9 0x63c71e9f3a88 in asan_thread_start(void*) llvmSrc/compiler-rt/lib/asan/asan_interceptors.cpp:239:28

SUMMARY: AddressSanitizer: 32 byte(s) leaked in 3 allocation(s).
@studokim studokim changed the title Memory leak in _webui_get_full_path_from_url Memory leak in _webui_get_file_name_from_url Aug 1, 2024
@mochalins
Copy link
Contributor

Fixed in #508

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