[vlc-devel] commit: Revert "Compile fix on windows -- vlc_mutex_init() now returns void ." (JP Dinger )

git version control git at videolan.org
Mon May 25 15:36:56 CEST 2009


vlc | branch: master | JP Dinger <jpd at videolan.org> | Mon May 25 15:12:23 2009 +0200| [b9646f8f0f92633b0b583059924e05c15df6368d] | committer: JP Dinger 

Revert "Compile fix on windows -- vlc_mutex_init() now returns void."
Fix turns out to not be quite a fix.

This reverts commit ba8f1f35e809572fb556818662bdf531a8a1c79a.

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

 include/vlc_gcrypt.h |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/include/vlc_gcrypt.h b/include/vlc_gcrypt.h
index db054f4..cd5ffd5 100644
--- a/include/vlc_gcrypt.h
+++ b/include/vlc_gcrypt.h
@@ -44,8 +44,12 @@ static int gcry_vlc_mutex_init( void **p_sys )
     if( p_lock == NULL)
         return ENOMEM;
 
-    vlc_mutex_init( p_lock );
-    return VLC_SUCCESS;
+    i_val = vlc_mutex_init( p_lock );
+    if( i_val )
+        free( p_lock );
+    else
+        *p_sys = p_lock;
+    return i_val;
 }
 
 static int gcry_vlc_mutex_destroy( void **p_sys )




More information about the vlc-devel mailing list