[Bugfix] Use free() instead of gnutls_free() on Windows.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4238 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/rfb/CSecurityTLS.cxx b/common/rfb/CSecurityTLS.cxx
index 12273a6..7e694d1 100644
--- a/common/rfb/CSecurityTLS.cxx
+++ b/common/rfb/CSecurityTLS.cxx
@@ -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
   }
 }