Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1451898

Re: [PATCH 2/3] staging: wilc1000: One function call less in mac_ioctl() after error detection

From Julian Calaby <julian.calaby@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/3] staging: wilc1000: One function call less in mac_ioctl() after error detection
Date 2016-07-28 14:10 +0200
Message-ID <rZSiu-64B-23@gated-at.bofh.it> (permalink)
References (15 earlier) <mSsDN-4wa-65@gated-at.bofh.it> <mSsDN-4wa-33@gated-at.bofh.it> <pFZhg-8iz-11@gated-at.bofh.it> <rYy2u-3R2-11@gated-at.bofh.it> <rYyca-3U4-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Marcus,

On Mon, Jul 25, 2016 at 6:22 AM, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sun, 24 Jul 2016 21:15:23 +0200
>
> The kfree() function was called in two cases by the mac_ioctl() function
> during error handling even if the passed variable did not contain a pointer
> for a valid data item.
>
> Improve this implementation detail by the introduction of another
> jump label.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>

This is pointless micro-optimisation: kfree(NULL) is perfectly valid
and buff is either malloc'd memory or NULL when it's called.

Thanks,

-- 
Julian Calaby

Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH 2/3] staging: wilc1000: One function call less in  mac_ioctl() after error detection Julian Calaby <julian.calaby@gmail.com> - 2016-07-28 14:10 +0200

csiph-web