void *gdImageJpegPtr (gdImagePtr im, int *size, int quality)
{
	void *rv;
	gdIOCtx *out = gdNewDynamicCtx (2048, NULL);
	gdImageJpegCtx (im, out, quality);
	rv = gdDPExtractData (out, size);
	out->gd_free (out);

	return rv;
}
The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations.