[Bug 2849] New: potential memory leak in server/window.c, function get_visible_region()
Wine Bugs
wine-bugs at winehq.org
Sun Apr 3 20:27:11 CDT 2005
http://bugs.winehq.org/show_bug.cgi?id=2849
Summary: potential memory leak in server/window.c, function
get_visible_region()
Product: Wine
Version: 20050310
Platform: Other
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: wine-kernel
AssignedTo: wine-bugs at winehq.org
ReportedBy: kremenek at cs.stanford.edu
I am a researcher with the Stanford Checking group.
I am performing experiments of our static analysis tool by running it on Wine.
There is a potential memory leak in server/window.c, function get_visible_region().
LINE: 712
--> create_empty_region() transitively calls malloc(), acquiring memory
--> from the heap
if (top && top != win && (tmp = create_empty_region()) != NULL)
{
offset_region( region, offset_x, offset_y ); /* make it .. */
while (win != top && win->parent)
{
if (win->style & WS_CLIPSIBLINGS)
{
--> here a NULL value returned by clip_children can trigger "goto error",
--> which does not free the region stored in "tmp"
if (!clip_children( win->parent, win, region, 0, 0 ))
goto error;
if (is_region_empty( region )) break;
}
COMMENT: It is not clear to me if clip_children can return NULL under a
different case than high memory pressure (it creates a region itself; if that
fails it returns NULL). I am not very familiar with the Wine code base.
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the wine-bugs
mailing list