[PATCH 0/1] MR2971: mscms: Fix double free on error path in EnumColorProfilesA (scan-build).
If fileW is not null, it is freed at the end of the function. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2971
From: Alex Henrie <alexhenrie24(a)gmail.com> If fileW is not null, it is freed at the end of the function. --- dlls/mscms/profile.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/mscms/profile.c b/dlls/mscms/profile.c index 9c4b6be8342..5ecd5f83273 100644 --- a/dlls/mscms/profile.c +++ b/dlls/mscms/profile.c @@ -810,6 +810,7 @@ BOOL WINAPI EnumColorProfilesA( PCSTR machine, PENUMTYPEA record, PBYTE buffer, if (!(ret = header_from_file( fileW, &header ))) { free( fileW ); + fileW = NULL; continue; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/2971
This merge request was approved by Hans Leidekker. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2971
participants (3)
-
Alex Henrie -
Alex Henrie (@alexhenrie) -
Hans Leidekker (@hans)