X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Ftelnet_cons.c;h=95623060dda8cd7b2366293bb28d330de03da5b0;hb=e61e0890e6f13b1362cfffdcd287e90f1d41e443;hp=7bda58b4555a3666a60404b8fcfccfc66ff7af85;hpb=ba178554a5f6714e5ceb7b77df462ac72de90b0c;p=palacios.git diff --git a/palacios/src/devices/telnet_cons.c b/palacios/src/devices/telnet_cons.c index 7bda58b..9562306 100644 --- a/palacios/src/devices/telnet_cons.c +++ b/palacios/src/devices/telnet_cons.c @@ -528,6 +528,12 @@ static int cons_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) { struct vm_device * frontend = v3_find_dev(vm, v3_cfg_val(frontend_cfg, "tag")); char * dev_id = v3_cfg_val(cfg, "ID"); + if (!state) { + PrintError("Cannot allocate in init\n"); + return -1; + } + + state->vm = vm; state->server_fd = 0; state->client_fd = 0;