summaryrefslogtreecommitdiff
path: root/plugins/Variables/src/parse_math.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-01-10 18:44:06 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-01-10 18:44:06 +0000
commit2cd05c2649104e8690defdcf0122d8c3e827c1d2 (patch)
treee778d1ebc66f1942eab066d8de5b0a77e612ef5f /plugins/Variables/src/parse_math.cpp
parente5972722ef981be64fe46ca8c07c2c403458e255 (diff)
Variables:
- Fixed various memory leaks git-svn-id: http://svn.miranda-ng.org/main/trunk@11821 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Variables/src/parse_math.cpp')
-rw-r--r--plugins/Variables/src/parse_math.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/Variables/src/parse_math.cpp b/plugins/Variables/src/parse_math.cpp
index bd11a39c9f..54820e48f1 100644
--- a/plugins/Variables/src/parse_math.cpp
+++ b/plugins/Variables/src/parse_math.cpp
@@ -142,8 +142,10 @@ static TCHAR *parseNum(ARGUMENTSINFO *ai)
unsigned zeros = max(padding - (signed int)_tcslen(szVal), 0);
TCHAR *res = (TCHAR*)mir_alloc((zeros + _tcslen(szVal) + 1)*sizeof(TCHAR));
- if (res == NULL)
+ if (res == NULL) {
+ mir_free(szVal);
return NULL;
+ }
memset(res, 0, ((zeros + _tcslen(szVal) + 1) * sizeof(TCHAR)));
TCHAR *cur = res;