diff options
author | OpenGnSys Support Team <soporte-og@soleta.eu> | 2020-04-29 13:07:53 +0200 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2020-06-02 12:32:36 +0200 |
commit | d7c20c8213033a5ed58e827daae027ac2d8b2cfe (patch) | |
tree | 6c9f72a8d29ac2539627d141b570b5091ff84941 /admin/Sources/Services/ogAdmServer/sources/ogAdmServer.c | |
parent | 21434baa5b3d9d0f09b7f9d98835a31f24705e0c (diff) |
#941 missing og_dbi_close
Diffstat (limited to 'admin/Sources/Services/ogAdmServer/sources/ogAdmServer.c')
-rw-r--r-- | admin/Sources/Services/ogAdmServer/sources/ogAdmServer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.c b/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.c index a3580efd..09ad7e69 100644 --- a/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.c +++ b/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.c @@ -3737,6 +3737,7 @@ static int og_dbi_schedule_get(void) dbi_conn_error(dbi->conn, &msglog); syslog(LOG_ERR, "failed to query database (%s:%d) %s\n", __func__, __LINE__, msglog); + og_dbi_close(dbi); return -1; } @@ -3757,6 +3758,7 @@ static int og_dbi_schedule_get(void) } dbi_result_free(result); + og_dbi_close(dbi); return 0; } @@ -4720,12 +4722,14 @@ static int og_dbi_get_computer_info(struct og_computer *computer, dbi_conn_error(dbi->conn, &msglog); syslog(LOG_ERR, "failed to query database (%s:%d) %s\n", __func__, __LINE__, msglog); + og_dbi_close(dbi); return -1; } if (!dbi_result_next_row(result)) { syslog(LOG_ERR, "client does not exist in database (%s:%d)\n", __func__, __LINE__); dbi_result_free(result); + og_dbi_close(dbi); return -1; } @@ -5282,6 +5286,7 @@ static int og_dbi_update_action(struct og_client *cli, bool success) dbi_conn_error(dbi->conn, &msglog); syslog(LOG_ERR, "failed to query database (%s:%d) %s\n", __func__, __LINE__, msglog); + og_dbi_close(dbi); return -1; } cli->last_cmd_id = 0; |