mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
util/nvmutil: stricter work buf check
check it right after initialisation Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -162,16 +162,16 @@ main(int argc, char *argv[])
|
||||
#endif
|
||||
|
||||
nv = new_xstate();
|
||||
|
||||
if (nv == NULL)
|
||||
err(errno, NULL);
|
||||
if (nv->f.buf == NULL)
|
||||
err(EINVAL, "Work buffer not initialised");
|
||||
|
||||
nv->argv0 = argv[0];
|
||||
if (argc < 3)
|
||||
usage();
|
||||
|
||||
if (nv->f.buf == NULL)
|
||||
err(EINVAL, "Work buffer not initialised");
|
||||
|
||||
f = &nv->f;
|
||||
|
||||
f->fname = argv[1];
|
||||
|
||||
Reference in New Issue
Block a user