grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem in usage of grub_errno...


From: Vesa Jääskeläinen
Subject: Re: problem in usage of grub_errno...
Date: Mon, 19 Dec 2005 17:35:57 +0200
User-agent: Thunderbird 1.4.1 (Windows/20051006)

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]