free_images(results, *count);
DGifCloseFile(GifFile);
myfree(GifRow);
+ if (comment)
+ myfree(comment);
return NULL;
}
free_images(results, *count);
DGifCloseFile(GifFile);
myfree(GifRow);
+ if (comment)
+ myfree(comment);
return NULL;
}
free_images(results, *count);
DGifCloseFile(GifFile);
myfree(GifRow);
+ if (comment)
+ myfree(comment);
return NULL;
}
mm_log((1, "i_readgif: image size exceeds limits\n"));
DGifCloseFile(GifFile);
myfree(GifRow);
+ if (comment)
+ myfree(comment);
return NULL;
}
img = i_img_pal_new(Width, Height, channels, 256);
if (!img) {
free_images(results, *count);
DGifCloseFile(GifFile);
+ if (comment)
+ myfree(comment);
+ myfree(GifRow);
return NULL;
}
/* populate the palette of the new image */
free_images(results, *count);
DGifCloseFile(GifFile);
myfree(GifRow);
+ if (comment)
+ myfree(comment);
return(0);
}
free_images(results, *count);
DGifCloseFile(GifFile);
myfree(GifRow);
+ if (comment)
+ myfree(comment);
return NULL;
}
free_images(results, *count);
DGifCloseFile(GifFile);
myfree(GifRow);
+ if (comment)
+ myfree(comment);
return NULL;
}
if (page != -1) {
myfree(GifRow);
DGifCloseFile(GifFile);
+ if (comment)
+ myfree(comment);
return results;
}
}
free_images(results, *count);
myfree(GifRow);
DGifCloseFile(GifFile);
+ if (comment)
+ myfree(comment);
return NULL;
}
}
gif_push_error();
i_push_error(0, "Reading extension record");
free_images(results, *count);
+ myfree(GifRow);
DGifCloseFile(GifFile);
+ if (comment)
+ myfree(comment);
return NULL;
}
+ /* possibly this should be an error, but "be liberal in what you accept" */
+ if (!Extension)
+ break;
if (ExtCode == 0xF9) {
got_gce = 1;
if (Extension[1] & 1)
gif_push_error();
i_push_error(0, "reading loop extension");
free_images(results, *count);
- DGifCloseFile(GifFile);
+ myfree(GifRow);
+ DGifCloseFile(GifFile);
+ if (comment)
+ myfree(comment);
return NULL;
}
if (Extension && *Extension == 3) {
gif_push_error();
i_push_error(0, "reading next block of extension");
free_images(results, *count);
+ myfree(GifRow);
DGifCloseFile(GifFile);
+ if (comment)
+ myfree(comment);
return NULL;
}
}
subblock[2] = loop_count / 256;
if (EGifPutExtensionLast(gf, APPLICATION_EXT_FUNC_CODE, 3, subblock) == GIF_ERROR) {
gif_push_error();
- i_push_error(0, "writing loop extention sub-block");
+ i_push_error(0, "writing loop extension sub-block");
return 0;
}
}