[Lcms-user] cmsOpenProfileFromStream and fclose
An ICC-based CMM for color management
Brought to you by:
mm2
|
From: Richard H. <hug...@gm...> - 2013-04-25 16:16:30
|
Hi all,
colord supports reading in ICC profiles from a file descriptor. To do
this I'm currently doing:
str = fdopen(fd, "r");
if (str == NULL)
goto out;
lcms_profile = cmsOpenProfileFromStream(str, "r");
I'm wondering if I should be calling fclose() on the 'str' obect.
Looking at cmsio0.c this seems to have iohandler->Close = FileClose
which seems to suggest that fclose() will get called for me by
cmsCloseIOhandler() in cmsCloseProfile and the stream has been kinda
"adopted" by lcms.
This adoption seems to confuse clang and coverity, both telling me I'm
not doing fclose() and that I'm leaking memory. I wanted a sanity
check before I report bugs, thanks.
Richard
|