summaryrefslogtreecommitdiff
blob: cb1886ef4a296e731691ff76e094a645197bbc20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$NetBSD: patch-libgnomevfs_gnome-vfs-ssl.c,v 1.1 2018/02/16 13:18:26 wiz Exp $

struct SSL is opaque in openssl-1.1; and the SSL_free() man page
says that one should not free members of it manually (in both
the openssl-1.0 and openssl-1.1 man pages).

--- a/libgnomevfs/gnome-vfs-ssl.c
+++ b/libgnomevfs/gnome-vfs-ssl.c
@@ -400,9 +400,6 @@ gnome_vfs_ssl_create_from_fd (GnomeVFSSS
 			}
 		}
 
-                if (ssl->private->ssl->ctx)
-                        SSL_CTX_free (ssl->private->ssl->ctx);
-
                 SSL_free (ssl->private->ssl);
 		g_free (ssl->private);
 		g_free (ssl);
@@ -705,7 +702,6 @@ gnome_vfs_ssl_destroy (GnomeVFSSSL *ssl,
 		}
 	}
 	
-	SSL_CTX_free (ssl->private->ssl->ctx);
 	SSL_free (ssl->private->ssl);
 	close (ssl->private->sockfd);
 	if (ssl->private->timeout)