mirror of
https://git.proxmox.com/git/grub2
synced 2025-05-19 17:43:17 +00:00
fix a memory issue
This commit is contained in:
parent
1d05467678
commit
70abc7023b
@ -95,8 +95,9 @@ void
|
|||||||
grub_script_free (struct grub_script *script)
|
grub_script_free (struct grub_script *script)
|
||||||
{
|
{
|
||||||
struct grub_script *s;
|
struct grub_script *s;
|
||||||
|
struct grub_script *t;
|
||||||
|
|
||||||
if (!script)
|
if (! script)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (script->mem)
|
if (script->mem)
|
||||||
@ -104,8 +105,9 @@ grub_script_free (struct grub_script *script)
|
|||||||
|
|
||||||
s = script->children;
|
s = script->children;
|
||||||
while (s) {
|
while (s) {
|
||||||
|
t = s->siblings;
|
||||||
grub_script_put (s);
|
grub_script_put (s);
|
||||||
s = s->siblings;
|
s = t;
|
||||||
}
|
}
|
||||||
grub_free (script);
|
grub_free (script);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user