From 1fffcc2229c3cc2fea52c9c3e6829ed99a70e7f1 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 8 Feb 2023 20:38:32 +0100 Subject: [PATCH 1/3] possiible leak fixes --- src/fsfw/tmtcservices/TmTcBridge.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/fsfw/tmtcservices/TmTcBridge.cpp b/src/fsfw/tmtcservices/TmTcBridge.cpp index f22d70d6..bed2c911 100644 --- a/src/fsfw/tmtcservices/TmTcBridge.cpp +++ b/src/fsfw/tmtcservices/TmTcBridge.cpp @@ -143,13 +143,17 @@ ReturnValue_t TmTcBridge::handleTmQueue() { #endif /* FSFW_VERBOSE_LEVEL >= 3 */ if (communicationLinkUp == false or packetSentCounter >= sentPacketsPerCycle) { - storeDownlinkData(&message); + ReturnValue_t result = storeDownlinkData(&message); + if (result != returnvalue::OK) { + tmStore->deleteData(message.getStorageId()); + } continue; } result = tmStore->getData(message.getStorageId(), &data, &size); if (result != returnvalue::OK) { status = result; + tmStore->deleteData(message.getStorageId()); continue; } @@ -157,9 +161,9 @@ ReturnValue_t TmTcBridge::handleTmQueue() { if (result != returnvalue::OK) { status = result; } else { - tmStore->deleteData(message.getStorageId()); packetSentCounter++; } + tmStore->deleteData(message.getStorageId()); } return status; } From 000df85556bb2bfc4e648f1e0324f71e240afd90 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 8 Feb 2023 21:24:00 +0100 Subject: [PATCH 2/3] bump changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ecc585d6..add39a3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## Fixes +- Memory leak fixes for the TCP/IP TMTC bridge. - `Service9TimeManagement`: Fix the time dump at the `SET_TIME` subservice: Include clock timeval seconds instead of uptime. PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/726 From f1b0ca7cffd53ef86ec94ebc6db084ffcee8c8fd Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 8 Feb 2023 21:26:37 +0100 Subject: [PATCH 3/3] add PR link --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index add39a3f..c7f0ce52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## Fixes - Memory leak fixes for the TCP/IP TMTC bridge. + PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/737 - `Service9TimeManagement`: Fix the time dump at the `SET_TIME` subservice: Include clock timeval seconds instead of uptime. PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/726