[vlc-commits] vmem: fix NULL dereference

Thomas Guillem git at videolan.org
Fri Sep 11 18:58:02 CEST 2015


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Sep 11 18:57:36 2015 +0200| [4b1a1155b96146e31698b0e3c93ce982d0fd7252] | committer: Thomas Guillem

vmem: fix NULL dereference

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4b1a1155b96146e31698b0e3c93ce982d0fd7252
---

 modules/video_output/vmem.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/vmem.c b/modules/video_output/vmem.c
index 3f117da..5a6d869 100644
--- a/modules/video_output/vmem.c
+++ b/modules/video_output/vmem.c
@@ -267,8 +267,11 @@ static void Close(vlc_object_t *object)
     if (sys->cleanup)
         sys->cleanup(sys->opaque);
 
-    picture_pool_Enum(sys->pool, Unlock, sys);
-    picture_pool_Release(sys->pool);
+    if (sys->pool)
+    {
+        picture_pool_Enum(sys->pool, Unlock, sys);
+        picture_pool_Release(sys->pool);
+    }
     free(sys);
 }
 



More information about the vlc-commits mailing list