diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-01-10 18:44:06 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-01-10 18:44:06 +0000 |
commit | 2cd05c2649104e8690defdcf0122d8c3e827c1d2 (patch) | |
tree | e778d1ebc66f1942eab066d8de5b0a77e612ef5f /plugins/Variables/src/parse_miranda.cpp | |
parent | e5972722ef981be64fe46ca8c07c2c403458e255 (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_miranda.cpp')
-rw-r--r-- | plugins/Variables/src/parse_miranda.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp index c696c74479..01b7581969 100644 --- a/plugins/Variables/src/parse_miranda.cpp +++ b/plugins/Variables/src/parse_miranda.cpp @@ -209,9 +209,7 @@ static TCHAR* parseDBSetting(ARGUMENTSINFO *ai) if (ai->argc < 4)
return NULL;
- TCHAR *res = NULL, *szDefaultValue = NULL;
MCONTACT hContact = NULL;
-
if (_tcslen(ai->targv[1]) > 0) {
CONTACTSINFO ci = { 0 };
ci.cbSize = sizeof(ci);
@@ -228,6 +226,8 @@ static TCHAR* parseDBSetting(ARGUMENTSINFO *ai) }
}
+ TCHAR *res = NULL, *szDefaultValue = NULL;
+
char *szModule = mir_t2a(ai->targv[2]);
char *szSetting = mir_t2a(ai->targv[3]);
@@ -238,6 +238,7 @@ static TCHAR* parseDBSetting(ARGUMENTSINFO *ai) res = getDBSetting(hContact, szModule, szSetting, szDefaultValue);
mir_free(szModule);
mir_free(szSetting);
+ mir_free(szDefaultValue);
}
return res;
}
|