From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Subject: [PATCH 3/3] staging: most: fix id leak
Date: Sun, 22 Nov 2015 22:30:56 +0530 [thread overview]
Message-ID: <1448211656-15829-3-git-send-email-sudipm.mukherjee@gmail.com> (raw)
In-Reply-To: <1448211656-15829-1-git-send-email-sudipm.mukherjee@gmail.com>
If create_most_inst_obj() fails we returned an error pointer but we
missed releasing id.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
drivers/staging/most/mostcore/core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/most/mostcore/core.c b/drivers/staging/most/mostcore/core.c
index 619d558..6210257 100644
--- a/drivers/staging/most/mostcore/core.c
+++ b/drivers/staging/most/mostcore/core.c
@@ -1762,6 +1762,7 @@ struct kobject *most_register_interface(struct most_interface *iface)
inst = create_most_inst_obj(name);
if (!inst) {
pr_info("Failed to allocate interface instance\n");
+ ida_simple_remove(&mdev_id, id);
return ERR_PTR(-ENOMEM);
}
--
1.9.1
prev parent reply other threads:[~2015-11-22 17:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-22 17:00 [PATCH 1/3] staging: most: fix error comparison Sudip Mukherjee
2015-11-22 17:00 ` [PATCH 2/3] staging: most: return proper error Sudip Mukherjee
2016-02-07 22:14 ` Greg Kroah-Hartman
2016-02-08 18:10 ` Sudip Mukherjee
2015-11-22 17:00 ` Sudip Mukherjee [this message]
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=1448211656-15829-3-git-send-email-sudipm.mukherjee@gmail.com \
--to=sudipm.mukherjee@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--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;
as well as URLs for NNTP newsgroup(s).