[PATCH 0/1] MR6211: wined3d: Fix a memory leak.
From: Haoyang Chen <chenhaoyang(a)kylinos.cn> --- dlls/wined3d/context_gl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c index 75f94678e14..cc7f766b20a 100644 --- a/dlls/wined3d/context_gl.c +++ b/dlls/wined3d/context_gl.c @@ -1286,6 +1286,7 @@ static BOOL wined3d_context_gl_set_gl_context(struct wined3d_context_gl *context return FALSE; } + wined3d_release_dc(context_gl->window, context_gl->dc); if (!(context_gl->dc = wined3d_device_gl_get_backup_dc(device_gl))) { wined3d_context_gl_set_current(NULL); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/6211
Looks right, though I'm not familiar with this code. Should we check if the dc is there? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6211#note_78003
On Thu Aug 8 06:15:20 2024 +0000, Jan Sikorski wrote:
Looks right, though I'm not familiar with this code. Should we check if the dc is there? Don't worry, the subsequent functions will be checked.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/6211#note_78081
Could you give some more context about how you found this and when this helps? In particular, is the window the DC belongs to still around when you hit this? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6211#note_78109
On Fri Aug 9 01:37:58 2024 +0000, Henri Verbeet wrote:
Could you give some more context about how you found this and when this helps? In particular, is the window the DC belongs to still around when you hit this? Hi, it was found in the WeChat Mini Program. If the WeChat Mini Program runs for about 30 minutes, DC will be exhausted. The window exists, but it does not belong to the current process.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/6211#note_78150
This merge request was approved by Elizabeth Figura. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6211
This merge request was approved by Jan Sikorski. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6211
participants (5)
-
Elizabeth Figura (@zfigura) -
Haoyang Chen -
Haoyang Chen (@chenhaoyang) -
Henri Verbeet (@hverbeet) -
Jan Sikorski (@jsikorski)