From dbc1d7539d11a0102b3b6b89f6c711a82b0a3fda Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Fri, 11 Sep 2015 20:13:52 +0000 Subject: AssocMgr: fix #945 git-svn-id: http://svn.miranda-ng.org/main/trunk@15329 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/AssocMgr/src/reg.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/AssocMgr/src/reg.cpp b/plugins/AssocMgr/src/reg.cpp index 79d710ff7c..55eed01b2f 100644 --- a/plugins/AssocMgr/src/reg.cpp +++ b/plugins/AssocMgr/src/reg.cpp @@ -435,14 +435,15 @@ static void BackupRegTree_Worker(HKEY hKey,const char *pszSubKey,struct BackupRe static void BackupRegTree(HKEY hKey, const char *pszSubKey, const char *pszDbPrefix) { + char *prefix = mir_strdup(pszDbPrefix); struct BackupRegTreeParam param; DWORD dwDbPrefixSize; param.level = 0; param.pdwDbPrefixSize = &dwDbPrefixSize; - param.ppszDbPrefix = (char**)&pszDbPrefix; - pszDbPrefix = NEWSTR_ALLOCA(pszDbPrefix); - dwDbPrefixSize = (int)mir_strlen(pszDbPrefix)+1; + param.ppszDbPrefix = (char**)&prefix; + dwDbPrefixSize = (int)mir_strlen(prefix) + 1; BackupRegTree_Worker(hKey, pszSubKey, ¶m); + mir_free(prefix); } static LONG RestoreRegTree(HKEY hKey,const char *pszSubKey,const char *pszDbPrefix) -- cgit v1.2.3