From 0c7d3922a5771bdb1effc652c380224063c3a36e Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 12 Aug 2002 14:54:38 +0000 Subject: [PATCH] Commented double-free buggy code. Will examine more closely later. --- src/video/x11/SDL_x11yuv.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/video/x11/SDL_x11yuv.c b/src/video/x11/SDL_x11yuv.c index d0b419ef9..ef7dd6136 100644 --- a/src/video/x11/SDL_x11yuv.c +++ b/src/video/x11/SDL_x11yuv.c @@ -132,17 +132,23 @@ SDL_Overlay *X11_CreateYUVOverlay(_THIS, int width, int height, Uint32 format, S SDL_NAME(XvFreeAdaptorInfo)(ainfo); } +#if 0 /* * !!! FIXME: * "Here are some diffs for X11 and yuv. Note that the last part 2nd * diff should probably be a new call to XvQueryAdaptorFree with ainfo * and the number of adaptors, instead of the loop through like I did." + * + * ACHTUNG: This is broken! It looks like XvFreeAdaptorInfo does this + * for you, so we end up with a double-free. I need to look at this + * more closely... --ryan. */ for ( i=0; i < adaptors; ++i ) { if (ainfo[i].name != NULL) Xfree(ainfo[i].name); if (ainfo[i].formats != NULL) Xfree(ainfo[i].formats); } Xfree(ainfo); +#endif if ( xv_port == -1 ) { SDL_SetError("No available video ports for requested format");