mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 12:33:44 +02:00
missed a rollback
This commit is contained in:
parent
33cc59914a
commit
43c108f077
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue