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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <200701021244.21728.m.kozlowski@tuxland.pl>
Date:	Tue, 2 Jan 2007 12:44:21 +0100
From:	Mariusz Kozlowski <m.kozlowski@...land.pl>
To:	isely@...ox.com
Cc:	pvrusb2@...ly.net, video4linux-list@...hat.com,
	linux-kernel@...r.kernel.org
Subject: [PATCH] video: pvrusb2-hdw kfree cleanup

Hello,

	This patch removes redundant argument check for kfree().

 drivers/media/video/pvrusb2/pvrusb2-hdw.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff -upr linux-2.6.20-rc2-mm1-a/drivers/media/video/pvrusb2/pvrusb2-hdw.c linux-2.6.20-rc2-mm1-b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
--- linux-2.6.20-rc2-mm1-a/drivers/media/video/pvrusb2/pvrusb2-hdw.c	2006-12-28 12:57:37.000000000 +0100
+++ linux-2.6.20-rc2-mm1-b/drivers/media/video/pvrusb2/pvrusb2-hdw.c	2007-01-02 01:48:31.000000000 +0100
@@ -1926,10 +1926,10 @@ struct pvr2_hdw *pvr2_hdw_create(struct 
 	if (hdw) {
 		usb_free_urb(hdw->ctl_read_urb);
 		usb_free_urb(hdw->ctl_write_urb);
-		if (hdw->ctl_read_buffer) kfree(hdw->ctl_read_buffer);
-		if (hdw->ctl_write_buffer) kfree(hdw->ctl_write_buffer);
-		if (hdw->controls) kfree(hdw->controls);
-		if (hdw->mpeg_ctrl_info) kfree(hdw->mpeg_ctrl_info);
+		kfree(hdw->ctl_read_buffer);
+		kfree(hdw->ctl_write_buffer);
+		kfree(hdw->controls);
+		kfree(hdw->mpeg_ctrl_info);
 		kfree(hdw);
 	}
 	return NULL;
@@ -1994,10 +1994,10 @@ void pvr2_hdw_destroy(struct pvr2_hdw *h
 			unit_pointers[hdw->unit_number] = NULL;
 		}
 	} while (0); up(&pvr2_unit_sem);
-	if (hdw->controls) kfree(hdw->controls);
-	if (hdw->mpeg_ctrl_info) kfree(hdw->mpeg_ctrl_info);
-	if (hdw->std_defs) kfree(hdw->std_defs);
-	if (hdw->std_enum_names) kfree(hdw->std_enum_names);
+	kfree(hdw->controls);
+	kfree(hdw->mpeg_ctrl_info);
+	kfree(hdw->std_defs);
+	kfree(hdw->std_enum_names);
 	kfree(hdw);
 }
 


-- 
Regards,

	Mariusz Kozlowski
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ