Re: [Lcms-user] cmsOpenProfileFromStream and fclose

2013-04-25 Thread Richard Hughes
On 25 April 2013 21:03, Marti Maria wrote: > Fine, I have reviewed the cmsOpenProfileFromStream code and it seems ok > to me, as long as you call cmsCloseProfile() your should not leak > resources. What I thought, thanks for sanity checking. I'll report a bug against coverity now. Richard.

Re: [Lcms-user] cmsOpenProfileFromStream and fclose

2013-04-25 Thread Marti Maria
Hi, Don't know about clang. Coverity is pretty smart, and it has found some sophisticated bugs for me in projects other than lcms, but still, sometimes pops up with false positives. On Qt for example, foreach calling delete on destructor turns it crazy. Fine, I have reviewed the cmsOpenProfil

[Lcms-user] cmsOpenProfileFromStream and fclose

2013-04-25 Thread Richard Hughes
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. Looki