BGD_DECLARE(void) gdImageJpegCtx(gdImagePtr im, gdIOCtx *outfile, int quality)
{
	_gdImageJpegCtx(im, outfile, quality);
}
The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations.