net/irda: fix NULL pointer dereference on memory allocation failure