diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-01-22 19:51:34 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-01-22 19:51:34 +0000 |
commit | 5e1548f7902322e8efe75c390c64c6b958c43b2d (patch) | |
tree | 65ab9d39bbf13597c6aa6d3a5348cd7752ce32dc /plugins/Watrack_MPD/src/utilities.cpp | |
parent | 5a168e085110bb7458b70e8b9a0075f161b40166 (diff) |
WATrack_MPD:
- Fixed memory leaks
git-svn-id: http://svn.miranda-ng.org/main/trunk@11894 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Watrack_MPD/src/utilities.cpp')
-rwxr-xr-x | plugins/Watrack_MPD/src/utilities.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/plugins/Watrack_MPD/src/utilities.cpp b/plugins/Watrack_MPD/src/utilities.cpp index 8ff7a65624..1375cc2bc1 100755 --- a/plugins/Watrack_MPD/src/utilities.cpp +++ b/plugins/Watrack_MPD/src/utilities.cpp @@ -19,14 +19,6 @@ TCHAR* __stdcall UniGetContactSettingUtf(MCONTACT hContact, const char *szModule,const char* szSetting, TCHAR* szDef) { - DBVARIANT dbv = {DBVT_DELETED}; - TCHAR* szRes = NULL; - if (db_get_ts(hContact, szModule, szSetting, &dbv)) - return _tcsdup(szDef); - else if(dbv.pszVal) - szRes = _tcsdup(dbv.ptszVal); - else - szRes = _tcsdup(szDef); - db_free(&dbv); - return szRes; + TCHAR *szRes = db_get_tsa(hContact, szModule, szSetting); + return szRes ? szRes : mir_tstrdup(szDef); } |