static void gdFreeDynamicCtx(struct gdIOCtx *ctx)
{
	dynamicPtr *dp;
	dpIOCtx *dctx;

	dctx = (dpIOCtx *)ctx;
	dp = dctx->dp;

	gdFree(ctx);

	/* clean up the data block and return it */
	/* 2.0.21: never free memory we don't own */
	if((dp->data != NULL) && (dp->freeOK)) {
		gdFree(dp->data);
		dp->data = NULL;
	}

	dp->realSize = 0;
	dp->logicalSize = 0;

	gdFree(dp);
}
static void gdFreeDynamicCtx(struct gdIOCtx *ctx)
{
	dynamicPtr *dp;
	dpIOCtx *dctx;

	dctx = (dpIOCtx *)ctx;
	dp = dctx->dp;

	gdFree(ctx);

	 
	 
	if((dp->data != NULL) && (dp->freeOK)) {
		gdFree(dp->data);
		dp->data = NULL;
	}

	dp->realSize = 0;
	dp->logicalSize = 0;

	gdFree(dp);
}