From 66c8a0eed32dcb7f996987b5b476703282780407 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Sun, 20 Sep 2015 14:18:40 +0200 Subject: [PATCH] Fuga de memoria solucionada --- src/proxy-auth/proxy-auth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/proxy-auth/proxy-auth.c b/src/proxy-auth/proxy-auth.c index 88965c5..534fa61 100644 --- a/src/proxy-auth/proxy-auth.c +++ b/src/proxy-auth/proxy-auth.c @@ -228,6 +228,7 @@ proxy_auth_authenticate (ProxyAuth * self, MYSQL_PLUGIN_VIO * vio, MYSQL_SERVER_ { int res = CR_ERROR; gchar * query = NULL; + GError * error = NULL; unsigned char * pkt; // Check for the username @@ -303,7 +304,6 @@ proxy_auth_authenticate (ProxyAuth * self, MYSQL_PLUGIN_VIO * vio, MYSQL_SERVER_ // Replaces the user and the pass on the query template - GError * error = NULL; RegexData regex_data; regex_data.conn = conn; regex_data.user = info->user_name; @@ -349,6 +349,7 @@ end: if (conn) g_async_queue_push (self->conn_pool, conn); + g_clear_error (&error); g_free (query); return res; }