Skip to content

lib1560: fix memory leak when run without UTF-8 support#17998

Closed
vszakats wants to merge 1 commit intocurl:masterfrom
vszakats:lib1560-fix-leak
Closed

lib1560: fix memory leak when run without UTF-8 support#17998
vszakats wants to merge 1 commit intocurl:masterfrom
vszakats:lib1560-fix-leak

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Jul 22, 2025

The issue is missed in CI, because valgrind jobs all run with UTF-8
support.

Fixing:

test 1560...[URL API]
 valgrind ERROR ==13362== 104 bytes in 1 blocks are definitely lost in loss record 1 of 1
==13362==    at 0x484D953: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==13362==    by 0x48E1302: curl_dbg_calloc (in /curl/bld/lib/libcurl.so.4.8.0)
==13362==    by 0x4931D12: curl_url (in /curl/bld/lib/libcurl.so.4.8.0)
==13362==    by 0x14F658: get_parts (in /curl/bld/tests/libtest/libtests)
==13362==    by 0x150AC6: test_lib1560 (in /curl/bld/tests/libtest/libtests)
==13362==    by 0x17F5D5: main (in /curl/bld/tests/libtest/libtests)

Ref: https://github.com/curl/curl/actions/runs/16446352985/job/46479298080?pr=17988#step:41:3007

Follow-up to 7d1ca2e #17933


w/o ws https://github.com/curl/curl/pull/17998/files?w=1

```
test 1560...[URL API]
 valgrind ERROR ==13362== 104 bytes in 1 blocks are definitely lost in loss record 1 of 1
==13362==    at 0x484D953: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==13362==    by 0x48E1302: curl_dbg_calloc (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
==13362==    by 0x4931D12: curl_url (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
==13362==    by 0x14F658: get_parts (in /home/runner/work/curl/curl/bld/tests/libtest/libtests)
==13362==    by 0x150AC6: test_lib1560 (in /home/runner/work/curl/curl/bld/tests/libtest/libtests)
==13362==    by 0x17F5D5: main (in /home/runner/work/curl/curl/bld/tests/libtest/libtests)
```
Ref: https://github.com/curl/curl/actions/runs/16446352985/job/46479298080?pr=17988#step:41:3007

Follow-up to 7d1ca2e curl#17933
@vszakats vszakats closed this in 5cdb9b4 Jul 22, 2025
@vszakats vszakats deleted the lib1560-fix-leak branch July 22, 2025 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant