diff options
author | George Hazan <george.hazan@gmail.com> | 2014-01-04 19:26:46 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-01-04 19:26:46 +0000 |
commit | fba57c10d9f9552c9c31c20283147348789ef650 (patch) | |
tree | 165c4c7ed8fad3c092bf455abf99af4a7a058383 /protocols/Gadu-Gadu/src/image.cpp | |
parent | 73504917190e8d183212ec62ad1668d3e72901a7 (diff) |
some code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@7499 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Gadu-Gadu/src/image.cpp')
-rw-r--r-- | protocols/Gadu-Gadu/src/image.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/protocols/Gadu-Gadu/src/image.cpp b/protocols/Gadu-Gadu/src/image.cpp index 88efe07a86..abcd765e88 100644 --- a/protocols/Gadu-Gadu/src/image.cpp +++ b/protocols/Gadu-Gadu/src/image.cpp @@ -139,12 +139,10 @@ static int gg_img_releasepicture(void *img) {
if (!img)
return FALSE;
- if (((GGIMAGEENTRY *)img)->lpszFileName)
- free(((GGIMAGEENTRY *)img)->lpszFileName);
+ free(((GGIMAGEENTRY *)img)->lpszFileName);
if (((GGIMAGEENTRY *)img)->hBitmap)
DeleteObject(((GGIMAGEENTRY *)img)->hBitmap);
- if (((GGIMAGEENTRY *)img)->lpData)
- free(((GGIMAGEENTRY *)img)->lpData);
+ free(((GGIMAGEENTRY *)img)->lpData);
free(img);
return TRUE;
@@ -1067,10 +1065,8 @@ void* GGPROTO::img_loadpicture(gg_event* e, TCHAR *szFileName) debugLogA("img_loadpicture(): MS_IMG_LOAD(MEM) failed.");
if (dat)
{
- if (dat->lpData)
- free(dat->lpData);
- if (dat->lpszFileName)
- free(dat->lpszFileName);
+ free(dat->lpData);
+ free(dat->lpszFileName);
free(dat);
}
return NULL;
|