[vlc-commits] vout_subpictures.c: Fix Dereference after null check (cid 1213781)
Jean-Paul Saman
git at videolan.org
Mon May 12 17:00:22 CEST 2014
vlc | branch: master | Jean-Paul Saman <jean-paul.saman at m2x.nl> | Mon May 12 16:26:11 2014 +0200| [bd4fde7b1927b3bad7731d3bf3935bee1652dccb] | committer: Jean-Paul Saman
vout_subpictures.c: Fix Dereference after null check (cid 1213781)
Fixes a bug introduced in commit 7d8714d90eaaf4f0e58685e62d14ac13d494f316
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bd4fde7b1927b3bad7731d3bf3935bee1652dccb
---
src/video_output/vout_subpictures.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c
index 07db389..a051c16 100644
--- a/src/video_output/vout_subpictures.c
+++ b/src/video_output/vout_subpictures.c
@@ -1393,8 +1393,9 @@ void spu_PutSubpicture(spu_t *spu, subpicture_t *subpic)
if only if 'chain_update' has a value */
if (chain_update && *chain_update) {
vlc_mutex_lock(&sys->lock);
- if (!sys->source_chain_update && !*sys->source_chain_update) {
- free(sys->source_chain_update);
+ if (!sys->source_chain_update || !*sys->source_chain_update) {
+ if (sys->source_chain_update)
+ free(sys->source_chain_update);
sys->source_chain_update = chain_update;
chain_update = NULL;
}
More information about the vlc-commits
mailing list