Fabian Maurer : printui: Use LocalFree for memory allocated by LocalAlloc (Coverity).

Alexandre Julliard julliard at winehq.org
Mon Apr 25 16:30:31 CDT 2022


Module: wine
Branch: master
Commit: f1cf7a02184f758b0b578909fceffc89581d76e6
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=f1cf7a02184f758b0b578909fceffc89581d76e6

Author: Fabian Maurer <dark.shadow4 at web.de>
Date:   Sat Apr 23 20:17:24 2022 +0200

printui: Use LocalFree for memory allocated by LocalAlloc (Coverity).

Signed-off-by: Fabian Maurer <dark.shadow4 at web.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/printui/printui.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/printui/printui.c b/dlls/printui/printui.c
index 8f65ed27e87..13669f05aab 100644
--- a/dlls/printui/printui.c
+++ b/dlls/printui/printui.c
@@ -227,7 +227,7 @@ void WINAPI PrintUIEntryW(HWND hWnd, HINSTANCE hInst, LPCWSTR pCommand, DWORD nC
     cx.nCmdShow = nCmdShow;
 
     if ((pCommand) && (pCommand[0])) {
-        /* result is allocated with GlobalAlloc() */
+        /* result is allocated with LocalAlloc() */
         cx.argv = CommandLineToArgvW(pCommand, &cx.argc);
         TRACE("got %d args at %p\n", cx.argc, cx.argv);
 
@@ -253,6 +253,6 @@ void WINAPI PrintUIEntryW(HWND hWnd, HINSTANCE hInst, LPCWSTR pCommand, DWORD nC
         FIXME("dialog: Printer / The operation was not successful\n");
     }
 
-    GlobalFree(cx.argv);
+    LocalFree(cx.argv);
 
 }




More information about the wine-cvs mailing list