diff options
Diffstat (limited to 'protocols/IcqOscarJ/src/oscar_filetransfer.cpp')
-rw-r--r-- | protocols/IcqOscarJ/src/oscar_filetransfer.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/protocols/IcqOscarJ/src/oscar_filetransfer.cpp b/protocols/IcqOscarJ/src/oscar_filetransfer.cpp index d6723ded10..1352f6918f 100644 --- a/protocols/IcqOscarJ/src/oscar_filetransfer.cpp +++ b/protocols/IcqOscarJ/src/oscar_filetransfer.cpp @@ -210,14 +210,19 @@ void CIcqProto::SafeReleaseFileTransfer(void **ft) SAFE_FREE(&ift->szFilename);
SAFE_FREE(&ift->szDescription);
SAFE_FREE(&ift->szSavePath);
- SAFE_FREE(&ift->szThisFile);
SAFE_FREE(&ift->szThisSubdir);
if (ift->pszFiles)
{
for (int i = 0; i < (int)ift->dwFileCount; i++)
+ {
+ // szThisFile can be a duplicate of pszFiles[i]
+ if (ift->szThisFile == ift->pszFiles[i])
+ ift->szThisFile = NULL;
SAFE_FREE(&ift->pszFiles[i]);
+ }
SAFE_FREE((void**)&ift->pszFiles);
}
+ SAFE_FREE(&ift->szThisFile);
// Invalidate transfer
ReleaseFileTransfer(ift);
#ifdef _DEBUG
|