and skips to that offset before reading image data. Previously this
value was read but otherwise ignored.
- added --palette action to tools/imager
+- i_img_pal_new() now releases the image object memory if creation
+ fails.
=================================================================
i_img *im;
mm_log((1, "i_img_pal_new(x %d, y %d, channels %d, maxpal %d)\n", x, y, channels, maxpal));
im = mymalloc(sizeof(i_img));
- return i_img_pal_new_low(im, x, y, channels, maxpal);
+ if (!i_img_pal_new_low(im, x, y, channels, maxpal)) {
+ myfree(im);
+ im = NULL;
+ }
+
+ return im;
}
/*