lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <427b03b5f10b41014818b9e78f79da9581b213df.1493383416.git.geliangtang@gmail.com>
Date:   Sat, 29 Apr 2017 09:42:53 +0800
From:   Geliang Tang <geliangtang@...il.com>
To:     Ivan Hu <ivan.hu@...onical.com>,
        Matt Fleming <matt@...eblueprint.co.uk>,
        Ard Biesheuvel <ard.biesheuvel@...aro.org>
Cc:     Geliang Tang <geliangtang@...il.com>, linux-efi@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] efi/efi_test: drop useless kfree

Drop useless kfree when memdup_user() failed, since we have already
called kfree in memdup_user().

Signed-off-by: Geliang Tang <geliangtang@...il.com>
---
 drivers/firmware/efi/test/efi_test.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/firmware/efi/test/efi_test.c b/drivers/firmware/efi/test/efi_test.c
index 08129b7..00332ae 100644
--- a/drivers/firmware/efi/test/efi_test.c
+++ b/drivers/firmware/efi/test/efi_test.c
@@ -261,10 +261,8 @@ static long efi_runtime_set_variable(unsigned long arg)
 	}
 
 	data = memdup_user(setvariable.data, setvariable.data_size);
-	if (IS_ERR(data)) {
-		kfree(name);
+	if (IS_ERR(data))
 		return PTR_ERR(data);
-	}
 
 	status = efi.set_variable(name, &vendor_guid,
 				setvariable.attributes,
-- 
2.9.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ