changeset 22203:009a79fb0bf4

Fix two 10l memleaks in vo_xvmc.c
author reimar
date Thu, 15 Feb 2007 00:46:45 +0000
parents e438a5af7771
children da9d0425a72a
files libvo/vo_xvmc.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_xvmc.c	Wed Feb 14 23:44:01 2007 +0000
+++ b/libvo/vo_xvmc.c	Thu Feb 15 00:46:45 2007 +0000
@@ -318,12 +318,14 @@
 	 XFree(mc_surf_list);//if mc_surf_num==0 is list==NULL ?
       }//for ports
    }//for adaptors
+   XvFreeAdaptorInfo(ai);
 
    if(!query) printf("vo_xvmc: Could not find free matching surface. Sorry.\n");
    return 0;
 
 // somebody know cleaner way to escape from 3 internal loops?
 surface_found:
+   XvFreeAdaptorInfo(ai);
 
    memcpy(surf_info,&mc_surf_list[s],sizeof(XvMCSurfaceInfo));
    if( mp_msg_test(MSGT_VO,MSGL_DBG3) || !query)
@@ -804,6 +806,7 @@
       if(rez!=Success){
          printf("vo_xvmc: Setting palette failed.\n");
       }
+      free(palette);
    }
 }