diff options
Diffstat (limited to 'iptables/iptables-restore.c')
-rw-r--r-- | iptables/iptables-restore.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/iptables/iptables-restore.c b/iptables/iptables-restore.c index d5603fce..142ddb82 100644 --- a/iptables/iptables-restore.c +++ b/iptables/iptables-restore.c @@ -323,8 +323,13 @@ iptables_restore_main(int argc, char *argv[]) strncpy(curtable, table, XT_TABLE_MAXNAMELEN); curtable[XT_TABLE_MAXNAMELEN] = '\0'; - if (tablename && (strcmp(tablename, table) != 0)) + if (tablename && (strcmp(tablename, table) != 0)) { + if (lock >= 0) { + xtables_unlock(lock); + lock = XT_LOCK_NOT_ACQUIRED; + } continue; + } if (handle) ops->free(handle); |