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)
|
||||
{
|
||||
struct grub_script *s;
|
||||
struct grub_script *t;
|
||||
|
||||
if (!script)
|
||||
if (! script)
|
||||
return;
|
||||
|
||||
if (script->mem)
|
||||
|
@ -104,8 +105,9 @@ grub_script_free (struct grub_script *script)
|
|||
|
||||
s = script->children;
|
||||
while (s) {
|
||||
t = s->siblings;
|
||||
grub_script_put (s);
|
||||
s = s->siblings;
|
||||
s = t;
|
||||
}
|
||||
grub_free (script);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue