# HG changeset patch # User iive # Date 1093254745 0 # Node ID e19b463098836f7d071a24b98d3038ee49182152 # Parent 17e40e9b76540f2bd90207cef1ed66e45e6aa802 prevent XFree execution on wrong condition diff -r 17e40e9b7654 -r e19b46309883 libvo/vo_xvmc.c --- a/libvo/vo_xvmc.c Mon Aug 23 08:03:31 2004 +0000 +++ b/libvo/vo_xvmc.c Mon Aug 23 09:52:25 2004 +0000 @@ -207,8 +207,8 @@ if(keycolor_handling == AUTO_COLORKEY){ //XV_AUTOPING_COLORKEY doesn't work for XvMC yet(NVidia 43.63) attributes = XvQueryPortAttributes(mDisplay, xv_port, &attrib_count); - if(attributes!=NULL) - for (i = 0; i < attrib_count; i++) + if(attributes!=NULL){ + for (i = 0; i < attrib_count; i++){ if (!strcmp(attributes[i].name, "XV_AUTOPAINT_COLORKEY")) { xv_atom = XInternAtom(mDisplay, "XV_AUTOPAINT_COLORKEY", False); @@ -220,7 +220,9 @@ } break; } + } XFree(attributes); + } } xv_atom = XInternAtom(mDisplay, "XV_COLORKEY",False);