Module: monitoring-plugins
 Branch: master
 Commit: c405dbafccd27259bd860ea408b32f2594e1a384
 Author: RincewindsHat <[email protected]>
   Date: Mon Sep 18 19:18:35 2023 +0200
    URL: 
https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=c405dba

Add mysql_close to avoid spamming the server logs

---

 plugins/check_mysql.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c
index 5b9a4fe..8dc554f 100644
--- a/plugins/check_mysql.c
+++ b/plugins/check_mysql.c
@@ -294,6 +294,7 @@ main (int argc, char **argv)
                                                /* free the result */
                                                mysql_free_result 
(res_mysqldump);
                                        }
+                                       mysql_close (&mysql);
                                }
                                if (mysqldump_threads == 0) {
                                        die (STATE_CRITICAL, "%s\n", 
slaveresult);

Reply via email to