mirror of
https://github.com/curl/curl.git
synced 2026-07-26 01:27:15 +03:00
mqtt: free 'sendleftovers' in disconnect
Fix a memory-leak Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43646 Closes #8415
This commit is contained in:
parent
d9c61a9792
commit
f9d1b25011
1 changed files with 2 additions and 0 deletions
|
|
@ -346,7 +346,9 @@ end:
|
|||
static CURLcode mqtt_disconnect(struct Curl_easy *data)
|
||||
{
|
||||
CURLcode result = CURLE_OK;
|
||||
struct MQTT *mq = data->req.p.mqtt;
|
||||
result = mqtt_send(data, (char *)"\xe0\x00", 2);
|
||||
Curl_safefree(mq->sendleftovers);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue