From: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
To: Jiri Slaby <jslaby@suse.cz>
Cc: jbarnes@virtuousgeek.org, linux-kernel@vger.kernel.org,
jirislaby@gmail.com, linux-pci@vger.kernel.org
Subject: Re: [PATCH 2/2] PCI: hotplug, fix memory leaks
Date: Thu, 07 Jan 2010 08:54:38 +0900 [thread overview]
Message-ID: <4B4522BE.7050902@jp.fujitsu.com> (raw)
In-Reply-To: <1262796476-17737-2-git-send-email-jslaby@suse.cz>
Good catch.
Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Jiri Slaby wrote:
> Stanse found a cut&pasted memory leak in pciehp_queue_pushbutton_work
> and shpchp_queue_pushbutton_work. info is not freed/assigned on all
> paths. Fix that.
>
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> Cc: linux-pci@vger.kernel.org
> ---
> drivers/pci/hotplug/pciehp_ctrl.c | 1 +
> drivers/pci/hotplug/shpchp_ctrl.c | 1 +
> 2 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c
> index d6ac1b2..9a7f247 100644
> --- a/drivers/pci/hotplug/pciehp_ctrl.c
> +++ b/drivers/pci/hotplug/pciehp_ctrl.c
> @@ -341,6 +341,7 @@ void pciehp_queue_pushbutton_work(struct work_struct *work)
> p_slot->state = POWERON_STATE;
> break;
> default:
> + kfree(info);
> goto out;
> }
> queue_work(pciehp_wq, &info->work);
> diff --git a/drivers/pci/hotplug/shpchp_ctrl.c b/drivers/pci/hotplug/shpchp_ctrl.c
> index b8ab279..86f6276 100644
> --- a/drivers/pci/hotplug/shpchp_ctrl.c
> +++ b/drivers/pci/hotplug/shpchp_ctrl.c
> @@ -462,6 +462,7 @@ void shpchp_queue_pushbutton_work(struct work_struct *work)
> p_slot->state = POWERON_STATE;
> break;
> default:
> + kfree(info);
> goto out;
> }
> queue_work(shpchp_wq, &info->work);
next prev parent reply other threads:[~2010-01-06 23:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-06 16:47 [PATCH 1/2] media: video/tuner-core, fix memory leak Jiri Slaby
2010-01-06 16:47 ` [PATCH 2/2] PCI: hotplug, fix memory leaks Jiri Slaby
2010-01-06 23:54 ` Kenji Kaneshige [this message]
2010-01-06 16:53 ` [PATCH 1/2] media: video/tuner-core, fix memory leak Jiri Slaby
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=4B4522BE.7050902@jp.fujitsu.com \
--to=kaneshige.kenji@jp.fujitsu.com \
--cc=jbarnes@virtuousgeek.org \
--cc=jirislaby@gmail.com \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@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.