Module: wine Branch: master Commit: 7eac467258694ae78b7542f24042fb5eb36ee229 URL: http://source.winehq.org/git/wine.git/?a=commit;h=7eac467258694ae78b7542f240...
Author: Francois Gouget fgouget@free.fr Date: Wed May 13 10:33:12 2009 +0200
winecfg: Use Win32 APIs instead of strdup().
---
programs/winecfg/audio.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/programs/winecfg/audio.c b/programs/winecfg/audio.c index 8e966a5..79e62f0 100644 --- a/programs/winecfg/audio.c +++ b/programs/winecfg/audio.c @@ -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)