From c0440263b057fea81b0c7fcb1f5828cf56916f9f Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Thu, 13 Apr 2017 23:39:14 +0000 Subject: [PATCH] scst_vdisk: fix memory leak in vdisk_write_proc() Another leak valgrind popped out, this one in vdisk_write_proc(). Signed-off-by: David Butterfield git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7116 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 7d188ee60..6caed8d92 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -10429,7 +10429,7 @@ static int vdisk_write_proc(char *buffer, char **start, off_t offset, PRINT_ERROR("File path \"%s\" is not " "absolute", filename); res = -EINVAL; - goto out_up; + goto out_free_vdev; } virt_dev->filename = kstrdup(filename, GFP_KERNEL);