[argyllcms] Re: Typos and freeing bad food

  • From: "Alastair M. Robinson" <profiling@xxxxxxxxxxxxxxxxxxxxxxx>
  • To: argyllcms@xxxxxxxxxxxxx
  • Date: Fri, 31 Oct 2008 19:14:06 +0000

Hi :)

Graeme Gill wrote:

You could try replacing the malloc at line 342 of scanrd.c with a calloc:

    if ((s = (scanrd_ *)calloc(1, sizeof(scanrd_))) == NULL)

For what it's worth, I hit the same issue today.  Scanin aborted with:

About to write diag file
All sample values have been filled
*** glibc detected *** /home/amr/Argyll/Argyll_V1.0.3/scanin/scanin: free(): invalid pointer: 0x00007f8263e6a4c8 ***

Making the calloc substitution, as suggested above, fixes it.

All the best,
--
Alastair M. Robinson


Other related posts: