aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/CSecurityTLS.cxx
diff options
context:
space:
mode:
authorAdam Tkac <atkac@redhat.com>2011-01-19 14:06:48 +0000
committerAdam Tkac <atkac@redhat.com>2011-01-19 14:06:48 +0000
commit5d4c6acf920cb7baba9c70137e3cbaa6d898830d (patch)
tree35d0d22c233e35f3d0c9db86d2a214a50a4a23e0 /common/rfb/CSecurityTLS.cxx
parent6959da13906a761b7ac5b186761315000b3f21cb (diff)
downloadtigervnc-5d4c6acf920cb7baba9c70137e3cbaa6d898830d.tar.gz
tigervnc-5d4c6acf920cb7baba9c70137e3cbaa6d898830d.zip
[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
Diffstat (limited to 'common/rfb/CSecurityTLS.cxx')
-rw-r--r--common/rfb/CSecurityTLS.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/common/rfb/CSecurityTLS.cxx b/common/rfb/CSecurityTLS.cxx
index 12273a60..7e694d1b 100644
--- a/common/rfb/CSecurityTLS.cxx
+++ b/common/rfb/CSecurityTLS.cxx
@@ -269,7 +269,16 @@ void CSecurityTLS::checkSession()
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 @@ void CSecurityTLS::checkSession()
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
}
}