different error when it reads a file with a bad magic number.
Update the test to handle the possible messages.
- some jpeg.c logging calls didn't include parameters enough to match
- the supplied format string.
+ the supplied format string. (detected by valgrind)
- in some cases memory wasn't being freed during error handling when
- reading jpeg images
+ reading jpeg images (detected by valgrind)
- free the TIFF object correctly when reading a TIFF image and the
- page number is out of range.
+ page number is out of range. (detected by valgrind)
+- i_gsampf() (used to implement getsamples() for floating point samples)
+ was leaking memory. (detected by valgrind)
=================================================================
chans[i] = SvIV(ST(i+4));
data = mymalloc(sizeof(i_fsample_t) * (r-l) * chan_count);
count = i_gsampf(im, l, r, y, data, chans, chan_count);
+ myfree(chans);
if (GIMME_V == G_ARRAY) {
EXTEND(SP, count);
for (i = 0; i < count; ++i)
EXTEND(SP, 1);
PUSHs(sv_2mortal(newSVpv((void *)data, count * sizeof(i_fsample_t))));
}
+ myfree(data);
}
else {
if (GIMME_V != G_ARRAY) {