X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_usr%2Fv3_os_debug.c;h=af55b8ad0bcde1b33f6fec7ad2b65c9dcb860a43;hb=5d1bbcc86de011e3f0d115b6f10fd8645cdf855e;hp=c530964b0cadc5b3afae3993dddca5b150a4968b;hpb=4fdb3bc363a277d32fd95f58358470874b992c53;p=palacios.git diff --git a/linux_usr/v3_os_debug.c b/linux_usr/v3_os_debug.c index c530964..af55b8a 100644 --- a/linux_usr/v3_os_debug.c +++ b/linux_usr/v3_os_debug.c @@ -29,6 +29,10 @@ int do_work(struct palacios_host_dev_host_request_response *req, putchar(req->data[i]); } *resp = malloc(sizeof(struct palacios_host_dev_host_request_response)); + if (!*resp) { + printf("Cannot allocate response\n"); + return -1; + } **resp=*req; (*resp)->len = (*resp)->data_len = sizeof(struct palacios_host_dev_host_request_response); (*resp)->op_len = numchars;