Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Oct 2011 08:11:18 +0000 (UTC)
From:      Lawrence Stewart <lstewart@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r226902 - projects/diffused_head/sys/netinet/ipfw
Message-ID:  <201110290811.p9T8BIhF001334@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110290811.p9T8BIhF001334>