Fixed memory leak in software YUV stretch code
authorSam Lantinga <slouken@lokigames.com>
Fri, 27 Apr 2001 20:25:25 +0000
changeset 9 a1c15fa4abb9
parent 8 5574376c451d
child 10 ee3bb7cd06b5
Fixed memory leak in software YUV stretch code
src/video/SDL_yuv_sw.c
--- a/src/video/SDL_yuv_sw.c	Fri Apr 27 16:56:47 2001 +0000
+++ b/src/video/SDL_yuv_sw.c	Fri Apr 27 20:25:25 2001 +0000
@@ -1299,6 +1299,9 @@
 
 	swdata = overlay->hwdata;
 	if ( swdata ) {
+		if ( swdata->stretch ) {
+			SDL_FreeSurface(swdata->stretch);
+		}
 		if ( swdata->pixels ) {
 			free(swdata->pixels);
 		}