Do not attempt to PQclear a null PQresult*
This commit is contained in:
parent
449e83fbf2
commit
2b2aead8b3
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ public:
|
|||
|
||||
PGresult *result = PQexec(conn_, sql.c_str());
|
||||
bool ok = (result && (PQresultStatus(result) == PGRES_COMMAND_OK));
|
||||
PQclear(result);
|
||||
if ( result ) PQclear(result);
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue