Commit 7eac4672 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

winecfg: Use Win32 APIs instead of strdup().

parent dde9f319
...@@ -543,7 +543,10 @@ static void findAudioDrivers(void) ...@@ -543,7 +543,10 @@ static void findAudioDrivers(void)
static void checkRegistrySetting(HWND hDlg) static void checkRegistrySetting(HWND hDlg)
{ {
const AUDIO_DRIVER *pAudioDrv; const AUDIO_DRIVER *pAudioDrv;
char * token, * tokens = strdup(curAudioDriver); char * token, * tokens;
tokens = HeapAlloc(GetProcessHeap(), 0, strlen(curAudioDriver)+1);
strcpy(tokens, curAudioDriver);
start_over: start_over:
token = strtok(tokens, ","); token = strtok(tokens, ",");
...@@ -581,7 +584,7 @@ start_over: ...@@ -581,7 +584,7 @@ start_over:
} }
token = strtok(NULL, ","); token = strtok(NULL, ",");
} }
free(tokens); HeapFree(GetProcessHeap(), 0, tokens);
} }
static void selectDriver(HWND hDlg, const char * driver) static void selectDriver(HWND hDlg, const char * driver)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment