Module: wine Branch: master Commit: 0f0678aa6047747cb7be9c55c74a377520d11994 URL: http://source.winehq.org/git/wine.git/?a=commit;h=0f0678aa6047747cb7be9c55c7...
Author: Alexander Nicolaysen Sørnes alex@thehandofagony.com Date: Tue Jan 29 22:04:25 2008 +0100
shell32: Use LocalFree in CommandLineToArgvW.
---
dlls/shell32/shell32_main.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c index 37694ba..a64381f 100644 --- a/dlls/shell32/shell32_main.c +++ b/dlls/shell32/shell32_main.c @@ -97,20 +97,20 @@ LPWSTR* WINAPI CommandLineToArgvW(LPCWSTR lpCmdline, int* numargs) /* Return the path to the executable */ DWORD len, size=16;
- hargv=GlobalAlloc(0, size); - argv=GlobalLock(hargv); + hargv=LocalAlloc(0, size); + argv=LocalLock(hargv); for (;;) { len = GetModuleFileNameW(0, (LPWSTR)(argv+1), (size-sizeof(LPWSTR))/sizeof(WCHAR)); if (!len) { - GlobalFree(hargv); + LocalFree(hargv); return NULL; } if (len < size) break; size*=2; - hargv=GlobalReAlloc(hargv, size, 0); - argv=GlobalLock(hargv); + hargv=LocalReAlloc(hargv, size, 0); + argv=LocalLock(hargv); } argv[0]=(LPWSTR)(argv+1); if (numargs)