Commit dae1df42 authored by Dennis Chen's avatar Dennis Chen Committed by Martin Schwidefsky

[S390] s390/char/vmur.c: fix memory leak

This patch is used to fix a memory leak issue in s390/char/vmur.c.
A character device instance is allocated by cdev_alloc, the cdev_del
will not free that space if cdev_init is applied before.
Signed-off-by: default avatarDennis Chen <dennis1.chen@amd.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent cd10502b
...@@ -903,7 +903,7 @@ static int ur_set_online(struct ccw_device *cdev) ...@@ -903,7 +903,7 @@ static int ur_set_online(struct ccw_device *cdev)
goto fail_urdev_put; goto fail_urdev_put;
} }
cdev_init(urd->char_device, &ur_fops); urd->char_device->ops = &ur_fops;
urd->char_device->dev = MKDEV(major, minor); urd->char_device->dev = MKDEV(major, minor);
urd->char_device->owner = ur_fops.owner; urd->char_device->owner = ur_fops.owner;
......
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