Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
0bd3d8e6
Commit
0bd3d8e6
authored
Jan 02, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Avoid leaking a handle in MFDRV_ExtSelectClipRgn.
parent
2159f2bc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
0 deletions
+19
-0
graphics.c
dlls/gdi32/mfdrv/graphics.c
+1
-0
metafiledrv.h
dlls/gdi32/mfdrv/metafiledrv.h
+1
-0
objects.c
dlls/gdi32/mfdrv/objects.c
+17
-0
No files found.
dlls/gdi32/mfdrv/graphics.c
View file @
0bd3d8e6
...
...
@@ -420,6 +420,7 @@ INT MFDRV_ExtSelectClipRgn( PHYSDEV dev, HRGN hrgn, INT mode )
if
(
iRgn
==
-
1
)
return
ERROR
;
ret
=
MFDRV_MetaParam1
(
dev
,
META_SELECTCLIPREGION
,
iRgn
)
?
NULLREGION
:
ERROR
;
MFDRV_MetaParam1
(
dev
,
META_DELETEOBJECT
,
iRgn
);
MFDRV_RemoveHandle
(
dev
,
iRgn
);
return
ret
;
}
...
...
dlls/gdi32/mfdrv/metafiledrv.h
View file @
0bd3d8e6
...
...
@@ -56,6 +56,7 @@ extern BOOL MFDRV_MetaParam8(PHYSDEV dev, short func, short param1, short param2
short
param6
,
short
param7
,
short
param8
);
extern
BOOL
MFDRV_WriteRecord
(
PHYSDEV
dev
,
METARECORD
*
mr
,
DWORD
rlen
);
extern
UINT
MFDRV_AddHandle
(
PHYSDEV
dev
,
HGDIOBJ
obj
);
extern
BOOL
MFDRV_RemoveHandle
(
PHYSDEV
dev
,
UINT
index
);
extern
INT16
MFDRV_CreateBrushIndirect
(
PHYSDEV
dev
,
HBRUSH
hBrush
);
/* Metafile driver functions */
...
...
dlls/gdi32/mfdrv/objects.c
View file @
0bd3d8e6
...
...
@@ -59,6 +59,23 @@ UINT MFDRV_AddHandle( PHYSDEV dev, HGDIOBJ obj )
}
/******************************************************************
* MFDRV_RemoveHandle
*/
BOOL
MFDRV_RemoveHandle
(
PHYSDEV
dev
,
UINT
index
)
{
METAFILEDRV_PDEVICE
*
physDev
=
(
METAFILEDRV_PDEVICE
*
)
dev
;
BOOL
ret
=
FALSE
;
if
(
index
<
physDev
->
handles_size
&&
physDev
->
handles
[
index
])
{
physDev
->
handles
[
index
]
=
0
;
physDev
->
cur_handles
--
;
ret
=
TRUE
;
}
return
ret
;
}
/******************************************************************
* MFDRV_FindObject
*/
static
INT16
MFDRV_FindObject
(
PHYSDEV
dev
,
HGDIOBJ
obj
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment