summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ip6tables-restore.c2
-rw-r--r--ip6tables-save.c1
-rw-r--r--iptables-restore.c2
-rw-r--r--iptables-save.c1
-rw-r--r--iptables-xml.c2
5 files changed, 8 insertions, 0 deletions
diff --git a/ip6tables-restore.c b/ip6tables-restore.c
index 1d5efea2..06a82aec 100644
--- a/ip6tables-restore.c
+++ b/ip6tables-restore.c
@@ -454,5 +454,7 @@ int main(int argc, char *argv[])
exit(1);
}
+ if (in != NULL)
+ fclose(in);
return 0;
}
diff --git a/ip6tables-save.c b/ip6tables-save.c
index 97205c1c..c59608fb 100644
--- a/ip6tables-save.c
+++ b/ip6tables-save.c
@@ -54,6 +54,7 @@ static int for_each_table(int (*func)(const char *tablename))
ret &= func(tablename);
}
+ fclose(procfile);
return ret;
}
diff --git a/iptables-restore.c b/iptables-restore.c
index 2a797ccf..5108fda6 100644
--- a/iptables-restore.c
+++ b/iptables-restore.c
@@ -459,5 +459,7 @@ main(int argc, char *argv[])
exit(1);
}
+ if (in != NULL)
+ fclose(in);
return 0;
}
diff --git a/iptables-save.c b/iptables-save.c
index 6000b494..f63ee6b1 100644
--- a/iptables-save.c
+++ b/iptables-save.c
@@ -52,6 +52,7 @@ static int for_each_table(int (*func)(const char *tablename))
ret &= func(tablename);
}
+ fclose(procfile);
return ret;
}
diff --git a/iptables-xml.c b/iptables-xml.c
index e5d19419..daf42084 100644
--- a/iptables-xml.c
+++ b/iptables-xml.c
@@ -870,6 +870,8 @@ main(int argc, char *argv[])
exit(1);
}
+ if (in != NULL)
+ fclose(in);
printf("</iptables-rules>\n");
free_argv();