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: <532868bf-3209-9059-fc1e-5194ab99b776@users.sourceforge.net>
Date:   Mon, 12 Sep 2016 20:46:49 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     ceph-devel@...r.kernel.org, Alex Elder <elder@...nel.org>,
        Ilya Dryomov <idryomov@...il.com>, Sage Weil <sage@...hat.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org,
        Julia Lawall <julia.lawall@...6.fr>
Subject: [PATCH 05/47] block-rbd: One function call less in rbd_dev_image_id()
 after error detection

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sun, 11 Sep 2016 15:05:49 +0200

The kfree() function was called in one case by the rbd_dev_image_id()
function during error handling even if the passed variable "response"
contained a null pointer.

Adjust a jump target according to the Linux coding style convention.

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 drivers/block/rbd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index c1da844..a6d9a06 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -5865,7 +5865,7 @@ static int rbd_dev_image_id(struct rbd_device *rbd_dev)
 	response = kzalloc(sizeof(__le32) + RBD_IMAGE_ID_LEN_MAX, GFP_NOIO);
 	if (!response) {
 		ret = -ENOMEM;
-		goto out;
+		goto free_name;
 	}
 
 	/* If it doesn't exist we'll assume it's a format 1 image */
@@ -5893,8 +5893,8 @@ static int rbd_dev_image_id(struct rbd_device *rbd_dev)
 		rbd_dev->spec->image_id = image_id;
 		dout("image_id is %s\n", image_id);
 	}
-out:
 	kfree(response);
+ free_name:
 	kfree(object_name);
 
 	return ret;
-- 
2.10.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ