diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-23 08:44:01 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-23 08:48:34 +0000 |
| commit | 7c414b2d849fd16a0c987d4c9d33db9eee0a610d (patch) | |
| tree | 5fb636d8f92ed82203ff803c421753444c6f51b9 /util/nvmutil/nvmutil.c | |
| parent | 024862a1523c7c8ed6d812b1dc4ed4ecd23d413f (diff) | |
mkhtemp: fix bad close
the fd in fs_resolve_at is subsequently used
note that in practise, this is not a real fix:
the best fix is to cache all descriptors and
free them at the end, once resolution is done.
not a real fix, because now fd leaks,
but it's dealt with on program close.
not a util yet. just just stubbing this in
main to test various features.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil/nvmutil.c')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index cb08ec43..b4715e5b 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -35,6 +35,16 @@ main(int argc, char *argv[]) size_t c; + int rval; + char *test = NULL; + int fd = -1; + rval = new_tmpfile(&fd, &test); + if (rval < 0) + err_no_cleanup(errno, "TESTERR: "); + + printf("TEST: %s", test); + exit(1); + /* https://man.openbsd.org/pledge.2 https://man.openbsd.org/unveil.2 */ #if defined(__OpenBSD__) && defined(OpenBSD) |
