Revision: 4238
          http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4238&view=rev
Author:   atkac
Date:     2011-01-19 14:06:48 +0000 (Wed, 19 Jan 2011)

Log Message:
-----------
[Bugfix] Use free() instead of gnutls_free() on Windows.

Modified Paths:
--------------
    trunk/common/rfb/CSecurityTLS.cxx

Modified: trunk/common/rfb/CSecurityTLS.cxx
===================================================================
--- trunk/common/rfb/CSecurityTLS.cxx   2011-01-17 10:58:08 UTC (rev 4237)
+++ trunk/common/rfb/CSecurityTLS.cxx   2011-01-19 14:06:48 UTC (rev 4238)
@@ -269,7 +269,16 @@
       throw AuthFailureException("decoding of certificate failed");
 
     if (gnutls_x509_crt_print(crt, GNUTLS_CRT_PRINT_ONELINE, &info)) {
+       /*
+        * GNUTLS doesn't correctly export gnutls_free symbol which is
+        * a function pointer. Linking with Visual Studio 2008 Express will
+        * fail when you call gnutls_free().
+        */
+#if WIN32
+       free(info.data);
+#else
         gnutls_free(info.data);
+#endif
        throw AuthFailureException("Could not find certificate to display");
     }
 
@@ -354,7 +363,16 @@
         throw AuthFailureException("certificate not trusted");
 
     gnutls_x509_crt_deinit(crt);
+    /*
+     * GNUTLS doesn't correctly export gnutls_free symbol which is
+     * a function pointer. Linking with Visual Studio 2008 Express will
+     * fail when you call gnutls_free().
+     */
+#if WIN32
+    free(info.data);
+#else
     gnutls_free(info.data);
+#endif
   }
 }
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Tigervnc-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits

Reply via email to