mail/dovecot: Add upstream patch to fix a double free in MySQL.
Obtained from: 3c5101ffdd
.patch
This commit is contained in:
parent
c635b9019c
commit
7c09023980
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=486621
@ -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/
|
||||
|
||||
|
24
mail/dovecot/files/patch-src_lib-sql_driver-mysql.c
Normal file
24
mail/dovecot/files/patch-src_lib-sql_driver-mysql.c
Normal file
@ -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);
|
Loading…
Reference in New Issue
Block a user