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; }