X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Finterfaces%2Fvmm_stream.c;h=27269d31527d62c9702044d9e6e340df41b12b16;hb=e61e0890e6f13b1362cfffdcd287e90f1d41e443;hp=377a545f51eea9c7d8fc9c1c92c0fa0d4c47f9c1;hpb=ef34565873989f5b0240f7f9911c3666a69587c9;p=palacios.git diff --git a/palacios/src/interfaces/vmm_stream.c b/palacios/src/interfaces/vmm_stream.c index 377a545..27269d3 100644 --- a/palacios/src/interfaces/vmm_stream.c +++ b/palacios/src/interfaces/vmm_stream.c @@ -36,7 +36,12 @@ struct v3_stream * v3_stream_open(struct v3_vm_info * vm, const char * name, V3_ASSERT(stream_hooks != NULL); V3_ASSERT(stream_hooks->open != NULL); - stream = V3_Malloc(sizeof(struct v3_stream *)); + stream = V3_Malloc(sizeof(struct v3_stream)); + + if (!stream) { + PrintError("Cannot allocate in opening a stream\n"); + return NULL; + } stream->input = input; stream->guest_stream_data = guest_stream_data;