summaryrefslogtreecommitdiffstats
path: root/xtables.c
diff options
context:
space:
mode:
Diffstat (limited to 'xtables.c')
-rw-r--r--xtables.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/xtables.c b/xtables.c
index cc4d2184..667656a0 100644
--- a/xtables.c
+++ b/xtables.c
@@ -16,4 +16,34 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <iptables_common.h>
#include <xtables.h>
+
+void *fw_calloc(size_t count, size_t size)
+{
+ void *p;
+
+ if ((p = calloc(count, size)) == NULL) {
+ perror("ip[6]tables: calloc failed");
+ exit(1);
+ }
+
+ return p;
+}
+
+void *fw_malloc(size_t size)
+{
+ void *p;
+
+ if ((p = malloc(size)) == NULL) {
+ perror("ip[6]tables: malloc failed");
+ exit(1);
+ }
+
+ return p;
+}