http://bugs.winehq.org/show_bug.cgi?id=16908
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=16908
--- Comment #1 from Vitaliy Margolen vitaliy@kievinfo.com 2009-01-12 17:27:15 --- *** Bug 16909 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=16908
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 OS/Version|All |other Platform|All |Other Version|CVS/GIT |1.1.12
--- Comment #2 from Dmitry Timoshkov dmitry@codeweavers.com 2009-01-12 23:45:49 --- Please send a patch to wine-patches.
http://bugs.winehq.org/show_bug.cgi?id=16908
--- Comment #3 from Peter Sedov psedov@gmail.com 2009-02-01 12:04:51 --- Created an attachment (id=19160) --> (http://bugs.winehq.org/attachment.cgi?id=19160) patch, adds call to HeapFree function
2 Dmitry Timoshkov:
Please send a patch to wine-patches.
Is it ok to post patch right here, not to wine-patches mailing list?
http://bugs.winehq.org/show_bug.cgi?id=16908
--- Comment #4 from Vitaliy Margolen vitaliy@kievinfo.com 2009-02-01 12:17:47 --- (In reply to comment #3)
Is it ok to post patch right here, not to wine-patches mailing list?
Patches are not being picked up from bugzilla.
http://bugs.winehq.org/show_bug.cgi?id=16908
--- Comment #5 from Austin English austinenglish@gmail.com 2009-02-21 15:42:51 --- I sent it: http://www.winehq.org/pipermail/wine-patches/2009-February/069701.html
http://bugs.winehq.org/show_bug.cgi?id=16908
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #6 from Austin English austinenglish@gmail.com 2009-02-23 10:04:47 --- Fixed: http://source.winehq.org/git/wine.git/?a=blobdiff;f=dlls/user32/winpos.c;h=b...
http://bugs.winehq.org/show_bug.cgi?id=16908
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #7 from Alexandre Julliard julliard@winehq.org 2009-02-27 16:31:32 --- Closing bugs fixed in 1.1.16.