summaryrefslogtreecommitdiffstats
path: root/sys/netpfil
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2015-04-27 05:44:09 +0000
committerglebius <glebius@FreeBSD.org>2015-04-27 05:44:09 +0000
commit5a54b2974a3a03429dd7a3e6e7c1b82e121f0477 (patch)
treea8dc89658cde092c9e3a197adc802e41149fcb94 /sys/netpfil
parent9a15b9fc7326b4a8e8b38e2e01a850260ee3034c (diff)
downloadFreeBSD-src-5a54b2974a3a03429dd7a3e6e7c1b82e121f0477.zip
FreeBSD-src-5a54b2974a3a03429dd7a3e6e7c1b82e121f0477.tar.gz
Fix memory leak.
PR: 199670 Reviewed by: ae
Diffstat (limited to 'sys/netpfil')
-rw-r--r--sys/netpfil/ipfw/ip_fw_nat.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/netpfil/ipfw/ip_fw_nat.c b/sys/netpfil/ipfw/ip_fw_nat.c
index 201be2f..201b77a 100644
--- a/sys/netpfil/ipfw/ip_fw_nat.c
+++ b/sys/netpfil/ipfw/ip_fw_nat.c
@@ -242,6 +242,8 @@ add_redir_spool_cfg(char *buf, struct cfg_nat *ptr)
}
if (r->alink[0] == NULL) {
printf("LibAliasRedirect* returned NULL\n");
+ free(r->alink, M_IPFW);
+ free(r, M_IPFW);
return (EINVAL);
}
/* LSNAT handling. */
OpenPOWER on IntegriCloud