summaryrefslogtreecommitdiff
path: root/protocols/Telegram/src/proto.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-07-15 20:53:18 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-07-15 20:53:18 +0300
commit36bae0cb914a64f5c9ce9a8e2b606b53cef7fd88 (patch)
tree575099ade38d4d9b9cd6540111c6c1c74d26c23c /protocols/Telegram/src/proto.h
parent4d84561727b143ddb3f905356c63e7609791dbc7 (diff)
memory leak fix
Diffstat (limited to 'protocols/Telegram/src/proto.h')
-rw-r--r--protocols/Telegram/src/proto.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/protocols/Telegram/src/proto.h b/protocols/Telegram/src/proto.h
index e83ed8ae6d..4fefc25766 100644
--- a/protocols/Telegram/src/proto.h
+++ b/protocols/Telegram/src/proto.h
@@ -71,6 +71,10 @@ struct TG_FILE_REQUEST : public MZeroedObject
m_uniqueId(_3)
{}
+ ~TG_FILE_REQUEST()
+ { delete ofd;
+ }
+
void AutoDetectType();
Type m_type;
@@ -78,7 +82,7 @@ struct TG_FILE_REQUEST : public MZeroedObject
TD::int53 m_fileId, m_fileSize = 0;
CMStringA m_uniqueId;
CMStringW m_destPath, m_fileName, m_wszDescr;
- OFDTHREAD *ofd;
+ OFDTHREAD *ofd = 0;
};
struct TG_USER : public MZeroedObject