mirror of https://github.com/Icinga/icinga2.git
Fix memory leak in the db_ido_pgsql module
fixes #7195 Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
This commit is contained in:
parent
ac32d4b382
commit
3700a33e7e
|
@ -371,8 +371,10 @@ IdoPgsqlResult IdoPgsqlConnection::Query(const String& query)
|
|||
char *rowCount = PQcmdTuples(result);
|
||||
m_AffectedRows = atoi(rowCount);
|
||||
|
||||
if (PQresultStatus(result) == PGRES_COMMAND_OK)
|
||||
if (PQresultStatus(result) == PGRES_COMMAND_OK) {
|
||||
PQclear(result);
|
||||
return IdoPgsqlResult();
|
||||
}
|
||||
|
||||
if (PQresultStatus(result) != PGRES_TUPLES_OK) {
|
||||
String message = PQresultErrorMessage(result);
|
||||
|
|
Loading…
Reference in New Issue