mscms: Free memory and handle on error path (Coverity).
This commit is contained in:
parent
6ee869da6d
commit
3f3404d248
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue