From 27ce33fe086d6d9c46bca06d6a2f52d5d134f4cc Mon Sep 17 00:00:00 2001 From: alex Date: Sat, 31 May 2003 17:33:33 +0000 Subject: [PATCH] unleak git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10221 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/video_out.c | 4 ++++ subreader.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/libvo/video_out.c b/libvo/video_out.c index fb5dfed516..44b8923136 100644 --- a/libvo/video_out.c +++ b/libvo/video_out.c @@ -227,10 +227,14 @@ vo_functions_t* init_best_video_out(char** vo_list){ if(!strcmp(info->short_name,vo)){ // name matches, try it if(!video_driver->preinit(vo_subdevice)) + { + free(vo); return video_driver; // success! + } } } // continue... + free(vo); ++vo_list; if(!(vo_list[0])) return NULL; // do NOT fallback to others } diff --git a/subreader.c b/subreader.c index 67c022b466..5d364085fc 100644 --- a/subreader.c +++ b/subreader.c @@ -1739,6 +1739,8 @@ char** sub_filenames(char* path, char *fname) result2[i] = result[i].fname; } result2[subcnt] = NULL; + + free(result); return result2; }