All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] ACPICIA: kfree() NULL pointer cleanup
Date: Sat, 07 Sep 2013 22:53:45 +0000	[thread overview]
Message-ID: <20130907225345.GW6329@mwanda> (raw)
In-Reply-To: <1378566444-15908-1-git-send-email-prtvar.b@gmail.com>

On Sat, Sep 07, 2013 at 05:07:24PM +0200, Bojan Prtvar wrote:
> Checking for NULL pointers before kfree() is redundant.
>        error_exit:
> -	if (gpe_register_info) {
> -		ACPI_FREE(gpe_register_info);
> -	}
> -	if (gpe_event_info) {
> -		ACPI_FREE(gpe_event_info);
> -	}
> +	ACPI_FREE(gpe_register_info);
> +	ACPI_FREE(gpe_event_info);

This isn't right.  If you have certain debugging turned on then
ACPI_FREE() does not accept NULL pointers.

regards,
dan carpenter


  parent reply	other threads:[~2013-09-07 22:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-07 15:07 [PATCH] ACPICIA: kfree() NULL pointer cleanup Bojan Prtvar
2013-09-07 21:49 ` Rafael J. Wysocki
2013-09-07 22:53 ` Dan Carpenter [this message]
2013-09-09 23:29 ` Zheng, Lv

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130907225345.GW6329@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.