From 7236ad5ff2dd67e069b3fb2bf9adc1e0f2135e6f Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 25 Aug 2012 12:11:52 +0200 Subject: video_out: free memory if initializing a VO fails This was a minor memory leak with no real impact. --- libvo/video_out.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libvo/video_out.c b/libvo/video_out.c index c685cecddd..a958847568 100644 --- a/libvo/video_out.c +++ b/libvo/video_out.c @@ -328,8 +328,10 @@ struct vo *init_best_video_out(struct MPOpts *opts, // continue... free(name); ++vo_list; - if (!(vo_list[0])) + if (!(vo_list[0])) { + talloc_free(vo); return NULL; // do NOT fallback to others + } } // now try the rest... vo_subdevice = NULL; -- cgit v1.2.3