1
0
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:
repojohnray 2023-01-13 01:45:41 +01:00
parent 2040edbe24
commit 4ef531e637
No known key found for this signature in database
GPG Key ID: 45E288320CD945F1

View File

@ -280,8 +280,10 @@ bool cIptvProtocolCurl::Connect()
return true; return true;
// Initialize the curl session // Initialize the curl session
if (!handleM) if (!handleM) {
handleM = curl_easy_init(); handleM = curl_easy_init();
connectedM = true;
}
if (handleM && !isempty(*streamUrlM)) { if (handleM && !isempty(*streamUrlM)) {
CURLcode res = CURLE_OK; CURLcode res = CURLE_OK;
@ -428,7 +430,6 @@ bool cIptvProtocolCurl::Connect()
} }
timeoutM.Set(eKeepAliveIntervalMs); timeoutM.Set(eKeepAliveIntervalMs);
connectedM = true;
return true; return true;
} }