[vlc-devel] commit: cmml: Fix a warning about vlc_create_thread() return value not checked. (Pierre d'Herbemont )

git version control git at videolan.org
Thu Aug 20 11:31:19 CEST 2009


vlc | branch: master | Pierre d'Herbemont <pdherbemont at free.fr> | Thu Aug 20 11:26:02 2009 +0200| [d02edd7a0e265bd30c2a5ae7ca88a746b35c1cec] | committer: Pierre d'Herbemont 

cmml: Fix a warning about vlc_create_thread() return value not checked.

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

 modules/codec/cmml/intf.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/modules/codec/cmml/intf.c b/modules/codec/cmml/intf.c
index 8e554cb..299a8fd 100644
--- a/modules/codec/cmml/intf.c
+++ b/modules/codec/cmml/intf.c
@@ -137,7 +137,12 @@ decoder_sys_t *OpenIntf ( vlc_object_t *p_this )
     var_AddCallback( p_intf->p_libvlc, "browse-follow-anchor",
                      FollowAnchorCallback, p_intf );
 
-    vlc_thread_create( p_intf, "cmml", RunIntf, VLC_THREAD_PRIORITY_LOW );
+    int ret = vlc_thread_create( p_intf, "cmml", RunIntf, VLC_THREAD_PRIORITY_LOW );
+    if (ret)
+    {
+        CloseIntf( p_intf);
+        return NULL;
+    }
     return p_intf;
 }
 




More information about the vlc-devel mailing list