From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: Eugene Teo <eugeneteo@kernel.sg>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fs/partitions/check.c: add_partition() warning fixes (take 2)
Date: Mon, 30 Jul 2007 12:30:45 +0200 [thread overview]
Message-ID: <20070730123045.4a3f859c@gondolin.boeblingen.de.ibm.com> (raw)
In-Reply-To: <20070730094755.GA25285@kernel.sg>
On Mon, 30 Jul 2007 17:47:55 +0800,
Eugene Teo <eugeneteo@kernel.sg> wrote:
> +err_out_del_link:
> + sysfs_remove_link(&p->kobj, "subsystem");
> +err_out_del_kobj:
> + if (!disk->part_uevent_suppress)
> + kobject_uevent(&p->kobj, KOBJ_REMOVE);
> + kobject_put(&p->kobj);
> +err_out:
> + kfree(p);
> }
No, this is wrong. You need to move the put behind err_out and remove
the kfree. (The release function will take care of p.)
next prev parent reply other threads:[~2007-07-30 10:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-30 9:47 Eugene Teo
2007-07-30 10:30 ` Cornelia Huck [this message]
2007-07-30 10:49 ` Eugene Teo
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=20070730123045.4a3f859c@gondolin.boeblingen.de.ibm.com \
--to=cornelia.huck@de.ibm.com \
--cc=eugeneteo@kernel.sg \
--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®