diff options
author | wm4 <wm4@nowhere> | 2012-08-25 12:11:52 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-09-18 21:04:45 +0200 |
commit | 7236ad5ff2dd67e069b3fb2bf9adc1e0f2135e6f (patch) | |
tree | 492e5b9aee1ef4aadea69cd3ba05342f979d3e6c | |
parent | 9194c810705c53d4052ebb8e2a276b52571843b0 (diff) | |
download | mpv-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.c | 4 |
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; |