From: Matthew Wilcox <willy@debian.org>
To: Hu Gang <gang_hu@soul.com.cn>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch] Serial 2/2
Date: Sun, 29 Sep 2002 17:11:04 +0100 [thread overview]
Message-ID: <20020929171104.G18377@parcelfarce.linux.theplanet.co.uk> (raw)
> @@ -1582,10 +1583,10 @@
> ret = -ENOMEM;
> }
>
> - if (ret) {
> - if (res_rsa)
> + if (ret == 0) {
> + if (res_rsa == 0)
> release_resource(res_rsa);
> - if (res)
> + if (res == 0)
> release_resource(res);
> }
> return ret;
definitely not.
if (res_rsa)
release_resource(res_rsa);
will release the resource if we allocated it. your patch calls
release_resource with an argument of NULL, and we'll leak the resource
we allocated.
i'm not sure about the rest of your changes, but this one is definitely
wrong.
--
Revolutions do not require corporate support.
next reply other threads:[~2002-09-29 16:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-29 16:11 Matthew Wilcox [this message]
2002-09-29 17:27 ` Russell King
-- strict thread matches above, loose matches on Subject: below --
2002-09-29 4:17 Hu Gang
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=20020929171104.G18377@parcelfarce.linux.theplanet.co.uk \
--to=willy@debian.org \
--cc=gang_hu@soul.com.cn \
--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®