projects
/
petitboot
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
493338c
)
discover/grub2: Fix free in load_env command
author
Jeremy Kerr
<jk@ozlabs.org>
Wed, 27 Nov 2013 11:43:25 +0000
(19:43 +0800)
committer
Jeremy Kerr
<jk@ozlabs.org>
Wed, 27 Nov 2013 11:43:25 +0000
(19:43 +0800)
We only need to free the buf if parser_request_file returned success.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
discover/grub2/env.c
patch
|
blob
|
history
diff --git
a/discover/grub2/env.c
b/discover/grub2/env.c
index c887c7511297c9829dab795c6cc9d84adce3401a..1c8635fbc924427b880ab518ff3e3ba7664dc259 100644
(file)
--- a/
discover/grub2/env.c
+++ b/
discover/grub2/env.c
@@
-84,10
+84,10
@@
int builtin_load_env(struct grub2_script *script,
rc = parser_request_file(script->ctx, dev, envpath, &buf, &len);
- if (!rc)
+ if (!rc)
{
rc = parse_buf_to_env(script, buf, len);
-
- talloc_free(buf);
+ talloc_free(buf);
+ }
return 0;
}