svn commit: r233745 - head/sys/netinet/ipfw
Gleb Smirnoff
glebius at FreeBSD.org
Sat Mar 31 11:20:49 UTC 2012
Author: glebius
Date: Sat Mar 31 11:20:48 2012
New Revision: 233745
URL: http://svn.freebsd.org/changeset/base/233745
Log:
Don't check malloc(M_WAITOK) results.
Modified:
head/sys/netinet/ipfw/ip_fw_sockopt.c
Modified: head/sys/netinet/ipfw/ip_fw_sockopt.c
==============================================================================
--- head/sys/netinet/ipfw/ip_fw_sockopt.c Sat Mar 31 10:47:40 2012 (r233744)
+++ head/sys/netinet/ipfw/ip_fw_sockopt.c Sat Mar 31 11:20:48 2012 (r233745)
@@ -163,8 +163,6 @@ ipfw_add_rule(struct ip_fw_chain *chain,
l = RULESIZE(input_rule);
rule = malloc(l, M_IPFW, M_WAITOK | M_ZERO);
- if (rule == NULL)
- return (ENOSPC);
/* get_map returns with IPFW_UH_WLOCK if successful */
map = get_map(chain, 1, 0 /* not locked */);
if (map == NULL) {
@@ -1010,8 +1008,6 @@ ipfw_ctl(struct sockopt *sopt)
if (size >= sopt->sopt_valsize)
break;
buf = malloc(size, M_TEMP, M_WAITOK);
- if (buf == NULL)
- break;
IPFW_UH_RLOCK(chain);
/* check again how much space we need */
want = chain->static_len + ipfw_dyn_len();
More information about the svn-src-head
mailing list