[lkml]   [2002]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] Trivial patch against mempool
Check if the alloc_fn and free_fn are not NULL. The caller generally
ensures that alloc_fn and free_fn are valid. It would not harm
to check. This makes the checking in mempool_create() more complete.

--- Fri Feb 22 12:00:58 2002
+++ mempool.c Fri Feb 22 12:01:13 2002
@@ -35,7 +35,7 @@
int i;

pool = kmalloc(sizeof(*pool), GFP_KERNEL);
- if (!pool)
+ if (!pool || !alloc_fn || !free_fn)
return NULL;
memset(pool, 0, sizeof(*pool));


Send and receive Hotmail on your mobile device:
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:24    [W:0.024 / U:1.876 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site