de = lookup_create(&nd,1);
- if (IS_ERR(de)) {
+ if (!de || IS_ERR(de)) {
ERROR("cannot allocate dentry\n");
goto fail_out;
}
strcat(path,"/");
strcat(path,key);
- fs = (struct file_stream *) palacios_alloc(sizeof(struct file_stream *));
+ fs = (struct file_stream *) palacios_alloc(sizeof(struct file_stream));
if (!fs) {
ERROR("cannot allocate file keyed stream for key %s\n",key);
fs->f = filp_open(path,O_RDWR|O_CREAT|O_LARGEFILE,0600);
- if (IS_ERR(fs->f)) {
+ if (!fs->f || IS_ERR(fs->f)) {
ERROR("cannot open relevent file \"%s\" for stream \"file:%s\" and key \"%s\"\n",path,fks->path,key);
palacios_free(fs);
palacios_free(path);
static int guest_deinit_keyed_streams(struct v3_guest * guest, void * vm_data)
{
+ remove_guest_ctrl(guest, V3_VM_KSTREAM_USER_CONNECT);
return 0;
}