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