mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-13 04:38:28 +00:00
missed a rollback
This commit is contained in:
@ -1399,6 +1399,7 @@ void PostgreSQL::commitThread()
|
|||||||
PQclear(res);
|
PQclear(res);
|
||||||
}
|
}
|
||||||
if (err) {
|
if (err) {
|
||||||
|
PQclear(res);
|
||||||
PQclear(PQexec(conn, "ROLLBACK"));
|
PQclear(PQexec(conn, "ROLLBACK"));
|
||||||
delete config;
|
delete config;
|
||||||
config = nullptr;
|
config = nullptr;
|
||||||
@ -1502,6 +1503,7 @@ void PostgreSQL::commitThread()
|
|||||||
if (PQresultStatus(res) != PGRES_COMMAND_OK) {
|
if (PQresultStatus(res) != PGRES_COMMAND_OK) {
|
||||||
fprintf(stderr, "ERROR: Error updating DNS: %s\n", PQresultErrorMessage(res));
|
fprintf(stderr, "ERROR: Error updating DNS: %s\n", PQresultErrorMessage(res));
|
||||||
PQclear(res);
|
PQclear(res);
|
||||||
|
PQclear(PQexec(conn, "ROLLBACK"));
|
||||||
err = true;
|
err = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user