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.
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel