http://bugs.winehq.org/show_bug.cgi?id=16909
Summary: memory leak in function SetWindowRgn (?) Product: Wine Version: CVS/GIT Platform: All OS/Version: All Status: UNCONFIRMED Severity: normal Priority: P2 Component: user32 AssignedTo: wine-bugs@winehq.org ReportedBy: psedov@gmail.com
Wine's implementation of WinAPI function SetWindowRgn (http://source.winehq.org/git/wine.git/?a=blob;f=dlls/user32/winpos.c;h=d680c...): ---------------- if (hrgn) { RGNDATA *data; DWORD size;
if (!(size = GetRegionData( hrgn, 0, NULL ))) return FALSE; if (!(data = HeapAlloc( GetProcessHeap(), 0, size ))) return FALSE; if (!GetRegionData( hrgn, size, data )) { HeapFree( GetProcessHeap(), 0, data ); return FALSE; } SERVER_START_REQ( set_window_region ) { req->window = wine_server_user_handle( hwnd ); req->redraw = (bRedraw != 0); if (data->rdh.nCount) wine_server_add_data( req, data->Buffer, data->rdh.nCount * sizeof(RECT) ); else wine_server_add_data( req, &empty_rect, sizeof(empty_rect) ); ret = !wine_server_call_err( req ); } SERVER_END_REQ; } ---------------- Variable 'data' points to memory block allocated via WinAPI function HeapAlloc. But I don't see where that memory block is freed via WinAPI function HeapFree. Is this a bug (memory leak) or am I just misunderstanding the code?
I posted this question to Google group comp.emulators.ms-windows.wine (http://groups.google.ru/group/comp.emulators.ms-windows.wine/browse_thread/t...), but nobody responded, so I'm re-asking it here.
http://bugs.winehq.org/show_bug.cgi?id=16909
--- Comment #1 from Peter Sedov psedov@gmail.com 2009-01-12 16:57:31 --- This is accidental duplicate post of bug 16908 (http://bugs.winehq.org/show_bug.cgi?id=16908), should be removed.
http://bugs.winehq.org/show_bug.cgi?id=16909
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |DUPLICATE
--- Comment #2 from Vitaliy Margolen vitaliy@kievinfo.com 2009-01-12 17:27:15 --- Duplicate
*** This bug has been marked as a duplicate of bug 16908 ***
http://bugs.winehq.org/show_bug.cgi?id=16909
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Vitaliy Margolen vitaliy@kievinfo.com 2009-01-12 17:27:30 --- Closing dup
http://bugs.winehq.org/show_bug.cgi?id=16909
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- OS/Version|All |other Platform|All |Other Version|CVS/GIT |1.1.12