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:
parent
c3b7fd2784
commit
52f3618e56
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user