mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2025-09-02 13:17:48 -04:00
Fix memory leak of the previous commit
This commit is contained in:
parent
3e4aadfaef
commit
cf06709cb4
@ -584,6 +584,7 @@ std::wstring BookmarkMgr::getSafeWstringValue(DataNode* node, const std::string&
|
|||||||
|
|
||||||
} catch (DataTypeMismatchException* e) {
|
} catch (DataTypeMismatchException* e) {
|
||||||
//2) wstring decode fail, try simple std::string
|
//2) wstring decode fail, try simple std::string
|
||||||
|
delete e;
|
||||||
std::string decodedStdString;
|
std::string decodedStdString;
|
||||||
try {
|
try {
|
||||||
|
|
||||||
@ -594,6 +595,7 @@ std::wstring BookmarkMgr::getSafeWstringValue(DataNode* node, const std::string&
|
|||||||
|
|
||||||
} catch (DataTypeMismatchException* e) {
|
} catch (DataTypeMismatchException* e) {
|
||||||
//nothing works, return an empty string.
|
//nothing works, return an empty string.
|
||||||
|
delete e;
|
||||||
decodedWString = L"";
|
decodedWString = L"";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -445,6 +445,7 @@ std::wstring DemodulatorMgr::getSafeWstringValue(DataNode* node) {
|
|||||||
|
|
||||||
} catch (DataTypeMismatchException* e) {
|
} catch (DataTypeMismatchException* e) {
|
||||||
//2) wstring decode fail, try simple std::string
|
//2) wstring decode fail, try simple std::string
|
||||||
|
delete e;
|
||||||
std::string decodedStdString;
|
std::string decodedStdString;
|
||||||
try {
|
try {
|
||||||
|
|
||||||
@ -454,6 +455,7 @@ std::wstring DemodulatorMgr::getSafeWstringValue(DataNode* node) {
|
|||||||
decodedWString = wxString(decodedStdString).ToStdWstring();
|
decodedWString = wxString(decodedStdString).ToStdWstring();
|
||||||
|
|
||||||
} catch (DataTypeMismatchException* e) {
|
} catch (DataTypeMismatchException* e) {
|
||||||
|
delete e;
|
||||||
//nothing works, return an empty string.
|
//nothing works, return an empty string.
|
||||||
decodedWString = L"";
|
decodedWString = L"";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user