diff --git a/CHANGELOG.md b/CHANGELOG.md index f343463..640d867 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,11 +4,21 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +#### [1.0.8](https://github.com/rdkcentral/hdmicec/compare/1.0.7...1.0.8) + +- RDKEMW-11021: fix the copilot static code analysis issues in hdmicec [`#42`](https://github.com/rdkcentral/hdmicec/pull/42) +- Update CODEOWNERS [`#40`](https://github.com/rdkcentral/hdmicec/pull/40) +- Deploy fossid_integration_stateless_diffscan_target_repo action [`#39`](https://github.com/rdkcentral/hdmicec/pull/39) +- Deploy cla action [`#21`](https://github.com/rdkcentral/hdmicec/pull/21) +- Merge tag '1.0.7' into develop [`51d878c`](https://github.com/rdkcentral/hdmicec/commit/51d878c268b58ffd3ded900f0bd3c397ffb6f74c) + #### [1.0.7](https://github.com/rdkcentral/hdmicec/compare/1.0.6...1.0.7) +> 22 September 2025 + +- 1.0.7 release change log updates [`de5193b`](https://github.com/rdkcentral/hdmicec/commit/de5193bf4c11001e21c060c00499e7538c10285b) - Merge pull request #36 from rdkcentral/topic/RDKEMW-6516-fix [`9dda320`](https://github.com/rdkcentral/hdmicec/commit/9dda3203ae90260c83bba9990273dba046053693) - Update DriverImpl.cpp [`1cbbf0e`](https://github.com/rdkcentral/hdmicec/commit/1cbbf0e7ee064503db93d56a0a8fb8d8bd4f7582) -- Merge tag '1.0.6' into develop [`7f9dc8c`](https://github.com/rdkcentral/hdmicec/commit/7f9dc8cfe935d2c9e0fcfa0e806ee795af8d52dd) #### [1.0.6](https://github.com/rdkcentral/hdmicec/compare/1.0.5...1.0.6) diff --git a/ccec/src/Bus.cpp b/ccec/src/Bus.cpp index a92efac..adc4af0 100644 --- a/ccec/src/Bus.cpp +++ b/ccec/src/Bus.cpp @@ -384,15 +384,23 @@ void Bus::send(const CECFrame &frame, int timeout) */ void Bus::sendAsync(const CECFrame &frame) { - {AutoLock lock_(wMutex); + {AutoLock lock_(wMutex); - if (!started) throw InvalidStateException(); + if (!started) throw InvalidStateException(); - CECFrame *copyFrame = (new CECFrame()); - *copyFrame = frame; + CECFrame *copyFrame = (new CECFrame()); + *copyFrame = frame; + // Copilot fix: Add exception-safe cleanup to prevent memory leak if offer() throws + try { + wQueue.offer((copyFrame)); + } + catch (...) { + CCEC_LOG( LOG_EXP, "Exception during copy frame offer...discarding\r\n"); + delete copyFrame; + throw; + } - wQueue.offer((copyFrame)); - } + } } /** diff --git a/ccec/src/DriverImpl.cpp b/ccec/src/DriverImpl.cpp index 31e1de9..13b90f4 100644 --- a/ccec/src/DriverImpl.cpp +++ b/ccec/src/DriverImpl.cpp @@ -71,6 +71,8 @@ void DriverImpl::DriverReceiveCallback(int handle, void *callbackData, unsigned } catch(...) { CCEC_LOG( LOG_EXP, "Exception during frame offer...discarding\r\n"); + // Copilot fix: Delete frame to prevent memory leak when offer() throws exception + delete frame; } CCEC_LOG( LOG_DEBUG, "frame offered\r\n"); }