[PR #486] [MERGED] Fixed memory leak with XDS videos #1297

Open
opened 2026-01-29 17:15:36 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/CCExtractor/ccextractor/pull/486
Author: @Izaron
Created: 12/7/2016
Status: Merged
Merged: 12/9/2016
Merged by: @cfsmp3

Base: masterHead: xds-leak


📝 Commits (1)

  • 941d554 Fixed memory leak with XDS videos

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 src/lib_ccx/ts_info.c (+1 -0)

📄 Description

Fixed memory leak

Valgrind log:

==24485== 
==24485== HEAP SUMMARY:
==24485==     in use at exit: 31,603,588 bytes in 1,084 blocks
==24485==   total heap usage: 185,004 allocs, 183,920 frees, 3,539,953,180 bytes allocated
==24485== 
==24485== 184,823 bytes in 3 blocks are possibly lost in loss record 1 of 2
==24485==    at 0x4C2FD5F: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==24485==    by 0x459590: copy_payload_to_capbuf (ts_functions.c:532)
==24485==    by 0x45A17E: ts_readstream (ts_functions.c:774)
==24485==    by 0x45A226: ts_getmoredata (ts_functions.c:801)
==24485==    by 0x449D50: general_loop (general_loop.c:825)
==24485==    by 0x4300B4: main (ccextractor.c:210)
==24485== 
==24485== 31,418,765 bytes in 1,081 blocks are definitely lost in loss record 2 of 2
==24485==    at 0x4C2FD5F: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==24485==    by 0x459590: copy_payload_to_capbuf (ts_functions.c:532)
==24485==    by 0x45A17E: ts_readstream (ts_functions.c:774)
==24485==    by 0x45A226: ts_getmoredata (ts_functions.c:801)
==24485==    by 0x449D50: general_loop (general_loop.c:825)
==24485==    by 0x4300B4: main (ccextractor.c:210)
==24485== 
==24485== LEAK SUMMARY:
==24485==    definitely lost: 31,418,765 bytes in 1,081 blocks
==24485==    indirectly lost: 0 bytes in 0 blocks
==24485==      possibly lost: 184,823 bytes in 3 blocks
==24485==    still reachable: 0 bytes in 0 blocks
==24485==         suppressed: 0 bytes in 0 blocks
==24485== 
==24485== For counts of detected and suppressed errors, rerun with: -v
==24485== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)

I checked out a few types of files (single file checked for single type) from https://sampleplatform.ccextractor.org/, leaks no longer detected.
If you have all the files from sampleplatform (it is a huge), then you can start valgrind automatically for all tests with error detection and you will get a full list of leaks.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/CCExtractor/ccextractor/pull/486 **Author:** [@Izaron](https://github.com/Izaron) **Created:** 12/7/2016 **Status:** ✅ Merged **Merged:** 12/9/2016 **Merged by:** [@cfsmp3](https://github.com/cfsmp3) **Base:** `master` ← **Head:** `xds-leak` --- ### 📝 Commits (1) - [`941d554`](https://github.com/CCExtractor/ccextractor/commit/941d5544cfe28327fdad666d0943075ac9e0131c) Fixed memory leak with XDS videos ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/lib_ccx/ts_info.c` (+1 -0) </details> ### 📄 Description Fixed memory leak Valgrind log: ``` ==24485== ==24485== HEAP SUMMARY: ==24485== in use at exit: 31,603,588 bytes in 1,084 blocks ==24485== total heap usage: 185,004 allocs, 183,920 frees, 3,539,953,180 bytes allocated ==24485== ==24485== 184,823 bytes in 3 blocks are possibly lost in loss record 1 of 2 ==24485== at 0x4C2FD5F: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==24485== by 0x459590: copy_payload_to_capbuf (ts_functions.c:532) ==24485== by 0x45A17E: ts_readstream (ts_functions.c:774) ==24485== by 0x45A226: ts_getmoredata (ts_functions.c:801) ==24485== by 0x449D50: general_loop (general_loop.c:825) ==24485== by 0x4300B4: main (ccextractor.c:210) ==24485== ==24485== 31,418,765 bytes in 1,081 blocks are definitely lost in loss record 2 of 2 ==24485== at 0x4C2FD5F: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==24485== by 0x459590: copy_payload_to_capbuf (ts_functions.c:532) ==24485== by 0x45A17E: ts_readstream (ts_functions.c:774) ==24485== by 0x45A226: ts_getmoredata (ts_functions.c:801) ==24485== by 0x449D50: general_loop (general_loop.c:825) ==24485== by 0x4300B4: main (ccextractor.c:210) ==24485== ==24485== LEAK SUMMARY: ==24485== definitely lost: 31,418,765 bytes in 1,081 blocks ==24485== indirectly lost: 0 bytes in 0 blocks ==24485== possibly lost: 184,823 bytes in 3 blocks ==24485== still reachable: 0 bytes in 0 blocks ==24485== suppressed: 0 bytes in 0 blocks ==24485== ==24485== For counts of detected and suppressed errors, rerun with: -v ==24485== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) ``` I checked out a few types of files (single file checked for single type) from https://sampleplatform.ccextractor.org/, leaks no longer detected. If you have all the files from sampleplatform (it is a huge), then you can start valgrind automatically for all tests with error detection and you will get a full list of leaks. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 17:15:36 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#1297