[vlc-commits] vout: fix mutex leak
Rémi Denis-Courmont
git at videolan.org
Wed Apr 22 22:47:59 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr 22 23:38:52 2015 +0300| [17db9540ac62b0df79c3226a5e7c3d93f1bd5b8b] | committer: Rémi Denis-Courmont
vout: fix mutex leak
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=17db9540ac62b0df79c3226a5e7c3d93f1bd5b8b
---
src/video_output/display.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/video_output/display.c b/src/video_output/display.c
index 3e3a3d5..8b078f9 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -1263,10 +1263,8 @@ static vout_display_t *DisplayNew(vout_thread_t *vout,
vout_display_t *p_display = vout_display_New(VLC_OBJECT(vout),
module, !is_wrapper,
source, cfg, &owner);
- if (!p_display) {
- free(osys);
- return NULL;
- }
+ if (!p_display)
+ goto error;
VoutDisplayCreateRender(p_display);
@@ -1276,6 +1274,10 @@ static vout_display_t *DisplayNew(vout_thread_t *vout,
osys->ch_sar = true;
return p_display;
+error:
+ vlc_mutex_destroy(&osys->lock);
+ free(osys);
+ return NULL;
}
void vout_DeleteDisplay(vout_display_t *vd, vout_display_state_t *state)
More information about the vlc-commits
mailing list