[dbmail/el6] Fix Memory Leak in IMAP SSL/TLS Connections (bz #833211)

Bernard Johnson bjohnson at fedoraproject.org
Sun Feb 23 07:05:46 UTC 2014


commit 9005b1fcab1937774d70a3af43e21503ae78ed96
Author: Bernard Johnson <bjohnson at symetrix.com>
Date:   Sun Feb 23 00:05:58 2014 -0700

    Fix Memory Leak in IMAP SSL/TLS Connections (bz #833211)

 dbmail-3.0.2-ssl-memory-leak.patch |   25 +++++++++++++++++++++++++
 dbmail.spec                        |    5 +++++
 2 files changed, 30 insertions(+), 0 deletions(-)
---
diff --git a/dbmail-3.0.2-ssl-memory-leak.patch b/dbmail-3.0.2-ssl-memory-leak.patch
new file mode 100644
index 0000000..5b3472d
--- /dev/null
+++ b/dbmail-3.0.2-ssl-memory-leak.patch
@@ -0,0 +1,25 @@
+From 7dcf55a92098ed8a12bbc210889948d0195bdee4 Mon Sep 17 00:00:00 2001
+From: Paul J Stevens <paul at nfg.nl>
+Date: Mon, 28 May 2012 14:52:37 +0000
+Subject: plug memory leak for SSL connects (losinggeneration)
+
+---
+diff --git a/src/clientbase.c b/src/clientbase.c
+index 4777d99..24bc087 100644
+--- a/src/clientbase.c
++++ b/src/clientbase.c
+@@ -523,6 +523,12 @@ void ci_close(ClientBase_T *self)
+ 		self->auth = NULL;
+ 	}
+ 
++	if (self->ssl) {
++		SSL_shutdown(self->ssl);
++		SSL_free(self->ssl);
++		self->ssl = NULL;
++	}
++
+ 	g_free(self);
+ 	
+ 	self = NULL;
+--
+cgit v0.9.0.3-4-gf50b
diff --git a/dbmail.spec b/dbmail.spec
index fbdcd14..6d5cc20 100644
--- a/dbmail.spec
+++ b/dbmail.spec
@@ -20,6 +20,7 @@ Source7:        README.fedora
 Source8:        dbmail.sysconfig
 
 Patch0:         dbmail-3.0.2-gthread.patch
+Patch1:         dbmail-3.0.2-ssl-memory-leak.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -68,6 +69,7 @@ installation and configuration in Fedora.
 # Temporary patch - gmime is not adding flags for gthread; add to
 # glib for now
 %patch0 -p1 -b .gthread
+%patch1 -p1 -b .ssl-memory-leak
 %endif
 
 # we don't need README.solaris and we don't want it caught up in the %%doc
@@ -190,6 +192,9 @@ dbmail.
 
 
 %changelog
+* Sun Feb 23 2014 Bernard Johnson <bjohnson at symetrix.com> - 3.0.2-3
+- Fix Memory Leak in IMAP SSL/TLS Connections (bz #833211)
+
 * Mon Mar 19 2012 Bernard Johnson <bjohnson at symetrix.com> - 3.0.2-2
 - EL patch reworked for gthread only
 


More information about the scm-commits mailing list