(not) Protecting of case IP_FW_GET.

Maxime Henrion mux at freebsd.org
Wed Aug 25 04:19:11 PDT 2004


Pawel Malachowski wrote:
> Another thing, in HEAD, there are three mallocs with M_WAITOK flag, only
> one of them checks if malloc succeed (lookup tables code) and returns
> ENOMEM, if not. Another two are assuming malloc will always succeed.
> In RELENG_4, result is checked and ENOBUFS (why not ENOMEM?) is returned
> if malloc failed.

The case where it checks the return value of malloc() is wrong.  When
called with the M_WAITOK flag, malloc() is not supposed to return NULL.

Cheers,
Maxime


More information about the freebsd-ipfw mailing list