Re: tty, hvc, xen: leak? dead code? everything is fine?

From: Stefano Stabellini
Date: Fri Apr 13 2012 - 07:01:16 EST


On Thu, 12 Apr 2012, Samuel Thibault wrote:
> Jesper Juhl, le Thu 12 Apr 2012 23:33:20 +0200, a Ãcrit :
> > Or *if* there's actually no way 'info->intfw' can actually be anything but
> > NULL in this case,
>
> There is no way that it's both non-NULL and the if was entered above: if
> the if was entered, the content of info is zeroes (kzalloc).

Yep. Thanks Samuel for the quick answer.

In more details: if the console has already been configured info->intf
is not NULL.
On the other hand if the console hasn't been configured yet info->intf
is NULL.

If the console has just been allocated by the kzalloc then obviously
it hasn't been configured and in fact info->intf is NULL.