[vlc-commits] chromecast: fix block leak in case of error
Thomas Guillem
git at videolan.org
Fri Dec 15 17:44:25 CET 2017
vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Dec 15 17:04:44 2017 +0100| [4c5e466a7a79b6e71aef4370419678f390398dd3] | committer: Thomas Guillem
chromecast: fix block leak in case of error
(cherry picked from commit a8a2a66eaec47e1a21d013481a86754b82832b1f)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=4c5e466a7a79b6e71aef4370419678f390398dd3
---
modules/stream_out/chromecast/cast.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp
index d184426a27..c746781e5f 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -33,6 +33,7 @@
#include "chromecast.h"
#include <vlc_sout.h>
+#include <vlc_block.h>
#include <cassert>
@@ -371,7 +372,10 @@ static int Send(sout_stream_t *p_stream, sout_stream_id_sys_t *id,
id = p_sys->GetSubId( p_stream, id );
if ( id == NULL )
+ {
+ block_Release( p_buffer );
return VLC_EGENERIC;
+ }
return sout_StreamIdSend(p_sys->p_out, id, p_buffer);
}
More information about the vlc-commits
mailing list