Re: [PATCH] Trivial patch against mempool

Benjamin LaHaise (bcrl@redhat.com)
Fri, 22 Feb 2002 19:02:56 -0500


On Fri, Feb 22, 2002 at 12:28:14PM -0800, Balbir Singh wrote:
> 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.

Rather than leak memory in that case, why not just BUG_ON null
function pointers so that people know what code is at fault?

-ben
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/