From: Larry Finger <Larry.Finger@lwfinger.net>
To: Alex Dubov <oakad@yahoo.com>, Catalin Marinas <catalin.marinas@arm.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Kay Sievers <kay.sievers@vrfy.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] memstick: Fix memory leak in memstick_check() error path
Date: Sun, 06 Oct 2013 22:17:20 -0500 [thread overview]
Message-ID: <525227C0.6040601@lwfinger.net> (raw)
In-Reply-To: <1381111070.35370.YahooMailNeo@web161301.mail.bf1.yahoo.com>
On 10/06/2013 08:57 PM, Alex Dubov wrote:
> Hi,
>
> In the good old times, when this driver was first written, device name used to be a fixed
> size array (of 32 chars, if I'm not mistaken) in the kobj struct, so there was no need to
> free it explicitly.
>
> Since than, somebody changed the name field to become a loose pointer, but it's not
> obvious how it is supposed to be handled these days.
It has been some time since it was changed. In commit af5ca3f by Kay Sievers and
merged on Dec 20, 2007, "const char *k_name" was changed to "const char *name".
I did not go any further back.
I'll submit V2 of my patch for further comment.
Larry
next prev parent reply other threads:[~2013-10-07 3:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-03 21:13 [PATCH] memstick: Fix memory leak in memstick_check() error path Larry Finger
2013-10-04 8:54 ` Catalin Marinas
2013-10-07 0:02 ` Larry Finger
2013-10-07 1:57 ` Alex Dubov
2013-10-07 3:17 ` Larry Finger [this message]
2013-10-07 8:48 ` Catalin Marinas
2013-10-08 2:13 ` [PATCH V2] " Greg Kroah-Hartman
2013-10-08 3:12 ` Larry Finger
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=525227C0.6040601@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=catalin.marinas@arm.com \
--cc=gregkh@linuxfoundation.org \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oakad@yahoo.com \
/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