From ebf654c8298352d3e46ac1adb8da20392add298d Mon Sep 17 00:00:00 2001
From: Martin Stjernholm <mast@lysator.liu.se>
Date: Sat, 12 Aug 2006 05:15:38 +0200
Subject: [PATCH] Fixed leak of the options mapping.

Rev: src/modules/Mysql/mysql.c:1.99
---
 src/modules/Mysql/mysql.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/modules/Mysql/mysql.c b/src/modules/Mysql/mysql.c
index bc64601985..ee62081fbf 100644
--- a/src/modules/Mysql/mysql.c
+++ b/src/modules/Mysql/mysql.c
@@ -2,7 +2,7 @@
 || This file is part of Pike. For copyright information see COPYRIGHT.
 || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
 || for more information.
-|| $Id: mysql.c,v 1.98 2006/08/12 02:57:55 mast Exp $
+|| $Id: mysql.c,v 1.99 2006/08/12 03:15:38 mast Exp $
 */
 
 /*
@@ -213,6 +213,10 @@ static void exit_mysql_struct(struct object *o)
     free_string(PIKE_MYSQL->host);
     PIKE_MYSQL->host = NULL;
   }
+  if (PIKE_MYSQL->options) {
+    free_mapping (PIKE_MYSQL->options);
+    PIKE_MYSQL->options = NULL;
+  }
 #ifndef HAVE_MYSQL_SET_CHARACTER_SET
   if (PIKE_MYSQL->conn_charset) {
     free_string (PIKE_MYSQL->conn_charset);
-- 
GitLab