diff options
author | Dennis Chen <dennis1.chen@amd.com> | 2012-04-11 08:28:05 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-04-11 08:28:24 -0400 |
commit | dae1df42f544ce3969d437dfa835169210593240 (patch) | |
tree | 2c396c7ff74c6855261e6aaefce8e5e2fd89324a /drivers/s390 | |
parent | cd10502b8276b0486850685383243cbd26d50c8d (diff) |
[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: Dennis Chen <dennis1.chen@amd.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/char/vmur.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/char/vmur.c b/drivers/s390/char/vmur.c index 85f4a9a5d12e..73bef0bd394c 100644 --- a/drivers/s390/char/vmur.c +++ b/drivers/s390/char/vmur.c | |||
@@ -903,7 +903,7 @@ static int ur_set_online(struct ccw_device *cdev) | |||
903 | goto fail_urdev_put; | 903 | goto fail_urdev_put; |
904 | } | 904 | } |
905 | 905 | ||
906 | cdev_init(urd->char_device, &ur_fops); | 906 | urd->char_device->ops = &ur_fops; |
907 | urd->char_device->dev = MKDEV(major, minor); | 907 | urd->char_device->dev = MKDEV(major, minor); |
908 | urd->char_device->owner = ur_fops.owner; | 908 | urd->char_device->owner = ur_fops.owner; |
909 | 909 | ||