Skip to content

Commit

Permalink
s4:dns_server: Check return value of ldb_transaction_commit() (CID 10…
Browse files Browse the repository at this point in the history
…34631)

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
  • Loading branch information
jsutton24 authored and abartlet committed Oct 13, 2023
1 parent d3b1aa6 commit 1ad4dd9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source4/dns_server/dns_update.c
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,10 @@ static WERROR handle_updates(struct dns_server *dns,

failed:
if (W_ERROR_IS_OK(werror)) {
ldb_transaction_commit(dns->samdb);
ret = ldb_transaction_commit(dns->samdb);
if (ret != LDB_SUCCESS) {
werror = DNS_ERR(SERVER_FAILURE);
}
} else {
ldb_transaction_cancel(dns->samdb);
}
Expand Down

0 comments on commit 1ad4dd9

Please sign in to comment.