Commit 3f3404d2 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mscms: Free memory and handle on error path (Coverity).

parent 6ee869da
......@@ -1528,14 +1528,18 @@ HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD sharing
if (cmsprofile)
{
struct profile profile;
HPROFILE hprof;
profile.file = handle;
profile.access = access;
profile.iccprofile = iccprofile;
profile.cmsprofile = cmsprofile;
return create_profile( &profile );
if ((hprof = create_profile( &profile ))) return hprof;
HeapFree( GetProcessHeap(), 0, iccprofile );
cmsCloseProfile( cmsprofile );
}
CloseHandle( handle );
#endif /* HAVE_LCMS */
return NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment