1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 01:55:48 -05:00

Fix memleak

Frees memory allocated
in ChannelWebAPIUtils::getCenterFrequency(unsigned int, double&) .../sdrbase/channel/channelwebapiutils.cpp:340
This commit is contained in:
Daniele Forsi 2024-06-08 15:10:26 +02:00
parent c3b7fd2784
commit 52f3618e56

View File

@ -338,7 +338,9 @@ bool ChannelWebAPIUtils::getCenterFrequency(unsigned int deviceIndex, double &fr
if (getDeviceSettings(deviceIndex, deviceSettingsResponse, deviceSet))
{
QJsonObject *jsonObj = deviceSettingsResponse.asJsonObject();
return WebAPIUtils::getSubObjectDouble(*jsonObj, "centerFrequency", frequencyInHz);
bool result = WebAPIUtils::getSubObjectDouble(*jsonObj, "centerFrequency", frequencyInHz);
delete jsonObj;
return result;
}
else
{