mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-07-08 18:06:30 +00:00
[PR #1994] Free filebuffer to prevent 16MB memory leak in ccxr_demuxer_close #2795
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/CCExtractor/ccextractor/pull/1994
Author: @THE-Amrit-mahto-05
Created: 1/7/2026
Status: 🔄 Open
Base:
master← Head:fix/demuxer-memory-leak📝 Commits (3)
e1ba42cfix: Free filebuffer to prevent 16MB memory leak in ccxr_demuxer_close472c8bdfix Free Rust filebuffer in ccxr_demuxer_delete to prevent memory leak and UB70d325fre run checks📊 Changes
2 files changed (+35 additions, -0 deletions)
View changed files
📝
src/lib_ccx/ccx_demuxer.c(+14 -0)📝
src/rust/src/libccxr_exports/demuxer.rs(+21 -0)📄 Description
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
Description
fixes a critical memory leak in CCExtractor where the file buffer allocated for each demuxer instance is never freed, causing 16MB of memory to leak per instance. This occurs because Rust allocated the buffer and then "forgot" it so C code could use it, leaving it unmanaged.
Changes made
ccxr_demuxer_close, the raw file buffer pointer is reclaimed as a boxed slice and dropped to allow Rust to free the memory.NULLto prevent double-free issues if C code tries to clean it up.Fixes: #1993
Verification
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.