winecfg: Use Win32 APIs instead of strdup().

oldstable
Francois Gouget 2009-05-13 10:33:12 +02:00 committed by Alexandre Julliard
parent dde9f31967
commit 7eac467258
1 changed files with 5 additions and 2 deletions

View File

@ -543,7 +543,10 @@ static void findAudioDrivers(void)
static void checkRegistrySetting(HWND hDlg)
{
const AUDIO_DRIVER *pAudioDrv;
char * token, * tokens = strdup(curAudioDriver);
char * token, * tokens;
tokens = HeapAlloc(GetProcessHeap(), 0, strlen(curAudioDriver)+1);
strcpy(tokens, curAudioDriver);
start_over:
token = strtok(tokens, ",");
@ -581,7 +584,7 @@ start_over:
}
token = strtok(NULL, ",");
}
free(tokens);
HeapFree(GetProcessHeap(), 0, tokens);
}
static void selectDriver(HWND hDlg, const char * driver)