mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-06-18 06:12:47 -04:00
Fix memleak
Frees memory allocated in ChannelWebAPIUtils::getCenterFrequency(unsigned int, double&) .../sdrbase/channel/channelwebapiutils.cpp:340
This commit is contained in:
parent
c3b7fd2784
commit
52f3618e56
@ -338,7 +338,9 @@ bool ChannelWebAPIUtils::getCenterFrequency(unsigned int deviceIndex, double &fr
|
|||||||
if (getDeviceSettings(deviceIndex, deviceSettingsResponse, deviceSet))
|
if (getDeviceSettings(deviceIndex, deviceSettingsResponse, deviceSet))
|
||||||
{
|
{
|
||||||
QJsonObject *jsonObj = deviceSettingsResponse.asJsonObject();
|
QJsonObject *jsonObj = deviceSettingsResponse.asJsonObject();
|
||||||
return WebAPIUtils::getSubObjectDouble(*jsonObj, "centerFrequency", frequencyInHz);
|
bool result = WebAPIUtils::getSubObjectDouble(*jsonObj, "centerFrequency", frequencyInHz);
|
||||||
|
delete jsonObj;
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user