From 8e2996b74afed2b3d3bec0e3ffde29451d2bd465 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 8 Mar 2016 18:24:23 +0000 Subject: [PATCH] scst_vdisk: Fix kfree() argument in vdev_size_store() error path The wrong variable is freed in the vdev_size_store() error path. Pass 'new_size' instead of 'buf' to kfree(). Signed-off-by: Sebastian Parschauer [ bvanassche: edited patch description ] git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6824 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 66ef444e8..35f633e5f 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -8686,7 +8686,7 @@ out: return res; out_free: - kfree(buf); + kfree(new_size); goto out; }