small ndis fix

Andrew Atrens atrens at nortelnetworks.com
Wed Nov 17 06:02:54 PST 2004


Straightforward bug fix on error path. Noticed while reviewing the ndis
code ...


--- subr_ndis.c.old	2004-11-17 08:50:54.000000000 -0500
+++ subr_ndis.c	2004-11-17 08:51:50.000000000 -0500
@@ -1561,7 +1561,7 @@
 	    ((descnum + NDIS_POOL_EXTRA) + 1),
 	    M_DEVBUF, M_WAITOK|M_ZERO);
 
-	if (pool == NULL) {
+	if (*pool == NULL) {
 		*status = NDIS_STATUS_RESOURCES;
 		return;
 	}
@@ -1784,7 +1784,7 @@
 	    ((descnum + NDIS_POOL_EXTRA) + 1),
 	    M_DEVBUF, M_WAITOK|M_ZERO);
 
-	if (pool == NULL) {
+	if (*pool == NULL) {
 		*status = NDIS_STATUS_RESOURCES;
 		return;
 	}




More information about the Submit mailing list