Debarshi Ray <[EMAIL PROTECTED]> ha escrit:

> unsigned char *
> env_default (int init, int welldefined)
> {
>   static struct env_lst *nep = NULL;
> 
>   if (init)
>     {
>       nep = &envlisthead;
>       return;

It is safe to return NULL here. When env_default is called
with init=1, its return value is ignored anyway.

As a side note, there is a more serious bug in env_define,
command.c:1918. The return value from malloc is not tested,
which can lead to a coredump. I'd propose to change it to
xmalloc to be on a safe side.

Regards,
Sergey
 


_______________________________________________
bug-inetutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-inetutils

Reply via email to