svn commit: r226902 - projects/diffused_head/sys/netinet/ipfw

Lawrence Stewart lstewart at FreeBSD.org
Sat Oct 29 08:11:18 UTC 2011


Author: lstewart
Date: Sat Oct 29 08:11:18 2011
New Revision: 226902
URL: http://svn.freebsd.org/changeset/base/226902

Log:
  Return ENOMEM on malloc failure instead of success.
  
  Sponsored by:	FreeBSD Foundation

Modified:
  projects/diffused_head/sys/netinet/ipfw/diffuse_feature_plenbd.c

Modified: projects/diffused_head/sys/netinet/ipfw/diffuse_feature_plenbd.c
==============================================================================
--- projects/diffused_head/sys/netinet/ipfw/diffuse_feature_plenbd.c	Sat Oct 29 08:09:37 2011	(r226901)
+++ projects/diffused_head/sys/netinet/ipfw/diffuse_feature_plenbd.c	Sat Oct 29 08:11:18 2011	(r226902)
@@ -119,7 +119,7 @@ plenbd_init_instance(struct di_cdata *cd
 
 	cdata->conf = malloc(sizeof(struct di_feature_plenbd_config), M_DIFFUSE,
 	    M_NOWAIT | M_ZERO);
-	if (cdata->conf)
+	if (cdata->conf == NULL)
 		return (ENOMEM);
 
 	conf = (struct di_feature_plenbd_config *)cdata->conf;


More information about the svn-src-projects mailing list