summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_struct.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/VKontakte/src/vk_struct.cpp')
-rw-r--r--protocols/VKontakte/src/vk_struct.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/protocols/VKontakte/src/vk_struct.cpp b/protocols/VKontakte/src/vk_struct.cpp
index ee3163de4c..498075db93 100644
--- a/protocols/VKontakte/src/vk_struct.cpp
+++ b/protocols/VKontakte/src/vk_struct.cpp
@@ -103,7 +103,10 @@ void AsyncHttpRequest::Redirect(NETLIBHTTPREQUEST *nhr)
CVkFileUploadParam::CVkFileUploadParam(MCONTACT _hContact, const TCHAR* _desc, TCHAR** _files) :
hContact(_hContact),
Desc(mir_tstrdup(_desc)),
- FileName(mir_tstrdup(_files[0]))
+ FileName(mir_tstrdup(_files[0])),
+ atr(NULL),
+ fname(NULL),
+ filetype(typeInvalid)
{}
CVkFileUploadParam::~CVkFileUploadParam()
@@ -119,6 +122,11 @@ CVkFileUploadParam::VKFileType CVkFileUploadParam::GetType()
if (filetype != typeInvalid)
return filetype;
+ if (atr)
+ mir_free(atr);
+ if (fname)
+ mir_free(fname);
+
TCHAR img[] = _T(".jpg .jpeg .png .bmp");
TCHAR audio[] = _T(".mp3");