Commit b4d80c8d authored by Guanjun's avatar Guanjun Committed by Michael S. Tsirkin

vduse: moving kvfree into caller

This free action should be moved into caller 'vduse_ioctl' in
concert with the allocation.

No functional change.
Signed-off-by: default avatarGuanjun <guanjun@linux.alibaba.com>
Link: https://lore.kernel.org/r/1638780498-55571-1-git-send-email-guanjun@linux.alibaba.comSigned-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent 20762071
......@@ -1357,7 +1357,6 @@ static int vduse_create_dev(struct vduse_dev_config *config,
err_str:
vduse_dev_destroy(dev);
err:
kvfree(config_buf);
return ret;
}
......@@ -1408,6 +1407,8 @@ static long vduse_ioctl(struct file *file, unsigned int cmd,
}
config.name[VDUSE_NAME_MAX - 1] = '\0';
ret = vduse_create_dev(&config, buf, control->api_version);
if (ret)
kvfree(buf);
break;
}
case VDUSE_DESTROY_DEV: {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment