changeset 10220:5f0d4b36db5a

unleak
author alex
date Sat, 31 May 2003 17:33:33 +0000
parents beeed3a9606e
children 75c4595b0ffd
files libvo/video_out.c subreader.c
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/video_out.c	Sat May 31 17:30:47 2003 +0000
+++ b/libvo/video_out.c	Sat May 31 17:33:33 2003 +0000
@@ -227,10 +227,14 @@
 	    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
       }
--- a/subreader.c	Sat May 31 17:30:47 2003 +0000
+++ b/subreader.c	Sat May 31 17:33:33 2003 +0000
@@ -1739,6 +1739,8 @@
 	result2[i] = result[i].fname;
     }
     result2[subcnt] = NULL;
+    
+    free(result);
 
     return result2;
 }