mirror of
https://github.com/rofafor/vdr-plugin-iptv.git
synced 2023-10-10 13:37:03 +02:00
Fix curl related memory leak
Direct leak of 21280 byte(s) in 4 object(s) allocated from: #2 0x7fe58e0fdac0 in curl_easy_init (/usr/local/lib64/libcurl.so.4+0x1dac0) #3 0x7fe58c763576 in cIptvProtocolCurl::Connect() iptv-2.4.0/protocolcurl.c:284 #4 0x7fe58c76a180 in cIptvProtocolCurl::cIptvProtocolCurl() iptv-2.4.0/protocolcurl.c:47 #5 0x7fe58c751950 in cIptvDevice::cIptvDevice(unsigned int) iptv-2.4.0/device.c:36 #6 0x7fe58c7539bb in cIptvDevice::Initialize(unsigned int) iptv-2.4.0/device.c:88 #7 0xa73380 in cPluginManager::InitializePlugins() vdr-2.4.7/plugin.c:375 #8 0x4e2eff in main vdr-2.4.7/vdr.c:833
This commit is contained in:
parent
2040edbe24
commit
4ef531e637
@ -280,8 +280,10 @@ bool cIptvProtocolCurl::Connect()
|
||||
return true;
|
||||
|
||||
// Initialize the curl session
|
||||
if (!handleM)
|
||||
if (!handleM) {
|
||||
handleM = curl_easy_init();
|
||||
connectedM = true;
|
||||
}
|
||||
|
||||
if (handleM && !isempty(*streamUrlM)) {
|
||||
CURLcode res = CURLE_OK;
|
||||
@ -428,7 +430,6 @@ bool cIptvProtocolCurl::Connect()
|
||||
}
|
||||
|
||||
timeoutM.Set(eKeepAliveIntervalMs);
|
||||
connectedM = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user