fix a memory issue
This commit is contained in:
parent
1d05467678
commit
70abc7023b
1 changed files with 4 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue