From: Jens Axboe <jens.axboe@oracle.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Mike Miller <mike.miller@hp.com>,
linux kernel <linux-kernel@vger.kernel.org>,
stable@kernel.org,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Subject: Re: [PATCH] cciss: memory leak in cciss_init_one()
Date: Mon, 24 Aug 2009 10:01:15 +0200 [thread overview]
Message-ID: <20090824080115.GA12579@kernel.dk> (raw)
In-Reply-To: <4A91058F.3050708@gmail.com>
On Sun, Aug 23 2009, Eric Dumazet wrote:
> Andrew, I originally sent this 18 days ago and got no reply yet,
> maybe could you get the baby ?
I'll add it for 2.6.32.
>
> Thanks
>
> [PATCH] cciss: memory leak in cciss_init_one()
>
> commit 22bece00dc1f28dd3374c55e464c9f02eb642876
> (cciss: fix regression firmware not displayed in procfs)
> added a small memory leak in cciss_init_one()
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> ---
> diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
> index a52cc7f..0589dfb 100644
> --- a/drivers/block/cciss.c
> +++ b/drivers/block/cciss.c
> @@ -3889,7 +3889,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
> int j = 0;
> int rc;
> int dac, return_code;
> - InquiryData_struct *inq_buff = NULL;
> + InquiryData_struct *inq_buff;
>
> if (reset_devices) {
> /* Reset the controller with a PCI power-cycle */
> @@ -4029,6 +4029,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
> printk(KERN_WARNING "cciss: unable to determine firmware"
> " version of controller\n");
> }
> + kfree(inq_buff);
>
> cciss_procinit(i);
>
> @@ -4045,7 +4046,6 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
> return 1;
>
> clean4:
> - kfree(inq_buff);
> kfree(hba[i]->cmd_pool_bits);
> if (hba[i]->cmd_pool)
> pci_free_consistent(hba[i]->pdev,
>
--
Jens Axboe
next prev parent reply other threads:[~2009-08-24 8:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-05 10:41 [PATCH] cciss: memory leak in cciss_init_one() Eric Dumazet
2009-08-23 9:02 ` Eric Dumazet
2009-08-24 8:01 ` Jens Axboe [this message]
2009-08-24 16:03 ` Miller, Mike (OS Dev)
2009-08-24 16:37 ` Eric Dumazet
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=20090824080115.GA12579@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=eric.dumazet@gmail.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.miller@hp.com \
--cc=stable@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.