I have added an initialization for the "tail" variable. I also make the error more verbose and put in an exit() call in case we are unable to allocate any memory. It's a bit crude, but I figure if we ever run into a situation where we can't allocate a tiny structure, the system has bigger issues to deal with.
In this case I don't think malloc(sizeof(*tail)) will work as that would only allocate the size of the pointer rather than the full structure (struct console). In principle, I agree malloc() is the cleaner function, but I'm going to leave the original as it seems to be doing the job without any problems. This bug will be fixed upstream in 0.64. - Jesse

