From: "Vesa Jääskeläinen" <chaac@nic.fi>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: problem in usage of grub_errno...
Date: Mon, 19 Dec 2005 17:35:57 +0200 [thread overview]
Message-ID: <43A6D35D.7080408@nic.fi> (raw)
In-Reply-To: <43A641EF.3040909@comcast.net>
Joel Buckley wrote:
> There is a second bug though...
>
> A possible stack memory-leak is possible. Replace the
> first line with the following to avoid the memory leak:
>
> if (grub_errno != GRUB_ERR_NONE) {
> grub_error_push();
> }
>
> Otherwise, a useless push is done.
Then you need to counter protect possible pop or pop will destroy one
error message from stack.
Eg. If you omit push, you can't do a pop.
Now if you consistently use push/pop then there is no problem. Yes there
will be unnecessary GRUB_ERR_NONE in stack, but it only takes one entry.
Can you explain to me what is this your's memory leak :)
Because I fail to see it. Please study the code in more detail.
next prev parent reply other threads:[~2005-12-19 15:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-09 21:58 problem in usage of grub_errno Vesa Jääskeläinen
2005-12-09 22:29 ` Marco Gerards
2005-12-10 10:05 ` Vesa Jääskeläinen
2005-12-10 13:11 ` Yoshinori K. Okuji
2005-12-10 20:12 ` Vesa Jääskeläinen
2005-12-17 17:40 ` Vesa Jääskeläinen
2005-12-17 22:59 ` Tomáš Ebenlendr
2005-12-17 23:16 ` Vesa Jääskeläinen
2005-12-19 5:15 ` Joel Buckley
2005-12-19 15:35 ` Vesa Jääskeläinen [this message]
2005-12-19 8:37 ` Tomáš Ebenlendr
2005-12-19 15:42 ` Vesa Jääskeläinen
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=43A6D35D.7080408@nic.fi \
--to=chaac@nic.fi \
--cc=grub-devel@gnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.