Repository :
http://git.fedorahosted.org/cgit/firewalld-recode.git
On branch : master
---------------------------------------------------------------
commit ccd5a8cb4b7b560589c5807806991906ffef9033
Author: Daniel Kopecek <dkopecek(a)redhat.com>
Date: Tue Oct 14 16:34:18 2014 +0200
Fixed transaction rollback loop
---------------------------------------------------------------
src/Daemon/Firewall/Backend.cpp | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/Daemon/Firewall/Backend.cpp b/src/Daemon/Firewall/Backend.cpp
index 73287b1..1dfb2ad 100644
--- a/src/Daemon/Firewall/Backend.cpp
+++ b/src/Daemon/Firewall/Backend.cpp
@@ -44,10 +44,9 @@ namespace firewalld
// Undo completed operations
if (ex.rollbackNeeded()) {
size_t i = ex.rollbackFromIndex();
- while (i > 1) {
+ do {
processOperation(transaction->operation(i), /*undo=*/true);
- --i;
- }
+ } while(i-- > 0);
}
throw;
}