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-prev] [day] [month] [year] [list]
Message-ID: <CANxBZFqdhbSttgf5C6UjmTvkS8BfHHbo2qSiftQtQCT0w=B07g@mail.gmail.com>
Date:	Wed, 10 Aug 2011 00:37:54 +0800
From:	Wang Shaoyan <stufever@...il.com>
To:	Joe Perches <joe@...ches.com>
Cc:	linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
	davem@...emloft.net, Wang Shaoyan <wangshaoyan.pt@...bao.com>
Subject: Re: [PATCH] gianfar: reduce stack usage in gianfar_ethtool.c

I thought kfree should not call, when kmalloc is failed. Now I think
is fine, thanks, it is much clearer

> Perhaps it'd be clearer to use:
>
>        local_rqfpr = kmalloc(...)
>        local_rqfcr = kmalloc(...)
>        if (!local_rqfpr || !local_rqfcr) {
>                pr_err(...)
>                ret = -ENOMEM;
>                goto err;
>        }
>
> [...]
>
> err:
>        kfree(local_rqfpr);
>        kfree(local_rqfcr);
>        return ret;
>
> Is the "local_" prefix useful?
> It seems like visual noise to me.

They are some temporary variable, we better to left them

>
>



-- 
Wang Shaoyan
--
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