Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Dec 2018 17:53:59 +0000 (UTC)
From:      Larry Rosenman <ler@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r486621 - in head/mail/dovecot: . files
Message-ID:  <201812041753.wB4HrxHB063074@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ler
Date: Tue Dec  4 17:53:58 2018
New Revision: 486621
URL: https://svnweb.freebsd.org/changeset/ports/486621

Log:
  mail/dovecot: Add upstream patch to fix a double free in MySQL.
  
  Obtained from:	https://github.com/dovecot/core/commit/3c5101ffdd2a8115e03ed7180d53578765dea4c9.patch

Added:
  head/mail/dovecot/files/patch-src_lib-sql_driver-mysql.c   (contents, props changed)
Modified:
  head/mail/dovecot/Makefile

Modified: head/mail/dovecot/Makefile
==============================================================================
--- head/mail/dovecot/Makefile	Tue Dec  4 17:53:54 2018	(r486620)
+++ head/mail/dovecot/Makefile	Tue Dec  4 17:53:58 2018	(r486621)
@@ -8,7 +8,7 @@
 
 PORTNAME=	dovecot
 PORTVERSION=	2.3.4
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	mail ipv6
 MASTER_SITES=	https://www.dovecot.org/releases/2.3/
 

Added: head/mail/dovecot/files/patch-src_lib-sql_driver-mysql.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/dovecot/files/patch-src_lib-sql_driver-mysql.c	Tue Dec  4 17:53:58 2018	(r486621)
@@ -0,0 +1,24 @@
+--- src/lib-sql/driver-mysql.c.orig	2018-11-23 11:06:45 UTC
++++ src/lib-sql/driver-mysql.c
+@@ -173,7 +173,9 @@ static int driver_mysql_connect(struct sql_db *_db)
+ static void driver_mysql_disconnect(struct sql_db *_db)
+ {
+ 	struct mysql_db *db = (struct mysql_db *)_db;
+-	mysql_close(db->mysql);
++	if (db->mysql != NULL)
++		mysql_close(db->mysql);
++	db->mysql = NULL;
+ }
+ 
+ static int driver_mysql_parse_connect_string(struct mysql_db *db,
+@@ -311,7 +313,9 @@ static void driver_mysql_deinit_v(struct sql_db *_db)
+ 	_db->no_reconnect = TRUE;
+ 	sql_db_set_state(&db->api, SQL_DB_STATE_DISCONNECTED);
+ 
+-	mysql_close(db->mysql);
++	if (db->mysql != NULL)
++		mysql_close(db->mysql);
++	db->mysql = NULL;
+ 
+ 	sql_connection_log_finished(_db);
+ 	event_unref(&_db->event);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812041753.wB4HrxHB063074>