mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rajan Aggarwal <rajan.aggarwal85@gmail.com>
To: Greg Kroah-Hartman <gregkh@suse.de>
Cc: linux-kernel@vger.kernel.org,
	Rajan Aggarwal <rajan.aggarwal85@gmail.com>
Subject: [PATCH 1/1] Free fw_priv in fw_create_instance
Date: Wed, 31 Aug 2011 00:36:32 +0530	[thread overview]
Message-ID: <1314731192-1960-1-git-send-email-rajan.aggarwal85@gmail.com> (raw)

fw_priv is not being freed in some of the error scenarios in
fw_create_instance.
This patch makes sure that this is kfreed properly in all error
situations in the fw_create_instance logic where it is required.

Signed-off-by: Rajan Aggarwal <rajan.aggarwal85@gmail.com>
---
 drivers/base/firmware_class.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 06ed6b4..3ddbc48 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -497,6 +497,7 @@ err_del_dev:
 	device_del(f_dev);
 err_put_dev:
 	put_device(f_dev);
+	kfree(fw_priv);
 err_out:
 	return ERR_PTR(error);
 }
-- 
1.7.4.1


             reply	other threads:[~2011-08-30 19:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-30 19:06 Rajan Aggarwal [this message]
2011-08-30 19:19 ` Greg KH
2011-08-30 19:46   ` Rajan Aggarwal
2011-08-30 21:26     ` Greg KH

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=1314731192-1960-1-git-send-email-rajan.aggarwal85@gmail.com \
    --to=rajan.aggarwal85@gmail.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®