summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-08-25 12:11:52 +0200
committerwm4 <wm4@nowhere>2012-09-18 21:04:45 +0200
commit7236ad5ff2dd67e069b3fb2bf9adc1e0f2135e6f (patch)
tree492e5b9aee1ef4aadea69cd3ba05342f979d3e6c
parent9194c810705c53d4052ebb8e2a276b52571843b0 (diff)
downloadmpv-7236ad5ff2dd67e069b3fb2bf9adc1e0f2135e6f.tar.bz2
mpv-7236ad5ff2dd67e069b3fb2bf9adc1e0f2135e6f.tar.xz
video_out: free memory if initializing a VO fails
This was a minor memory leak with no real impact.
-rw-r--r--libvo/video_out.c4
1 files changed, 3 insertions, 1 deletions
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;