log: Allow runtime selection of 'debug' log level
[petitboot] / discover / grub2 / env.c
index 90e9c69667abe47db82ee324c3f52052bba99648..1c8635fbc924427b880ab518ff3e3ba7664dc259 100644 (file)
@@ -5,7 +5,7 @@
 #include <log/log.h>
 #include <types/types.h>
 #include <talloc/talloc.h>
-#include <array-size/array-size.h>
+#include <util/util.h>
 
 #include <discover/parser.h>
 #include <discover/file.h>
@@ -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;
 }