From 5b22c26d42b90e7ca8e42330e17c19e47ec0cb26 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 25 Feb 2019 05:48:05 +0000 Subject: [PATCH] scst_vdisk: Fix a use-after-free This patch fixes Coverity ID 333128. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7993 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 8daa55c1d..f442cc76e 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -7147,8 +7147,7 @@ static void vdev_check_node(struct scst_vdisk_dev **pvirt_dev, int orig_nodeid) * pointers in the virtual device that point to the virtual * device itself. */ - INIT_WORK(&virt_dev->vdev_inq_changed_work, - vdev_inq_changed_fn); + INIT_WORK(&v->vdev_inq_changed_work, vdev_inq_changed_fn); *pvirt_dev = v; }