From 77c57d362494bedd62cde11e5f502ec0ca90ae79 Mon Sep 17 00:00:00 2001 From: Avril Date: Sun, 11 Jul 2021 21:40:27 +0100 Subject: [PATCH] Remove extra loop counter data dependancy in `map_haystacks()` error rollback path. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fortune for naka's current commit: Small curse − 小凶 --- src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 855153b..c3d23c4 100644 --- a/src/main.c +++ b/src/main.c @@ -59,8 +59,8 @@ static int map_haystacks(const char* const * h, map_t maps[pOUT]) // Prep reset maps to before `c` for unwind maps-=1; ERROR("Failed to map file `%s', rolling back %lu maps. (erp: %p, prev: %p)", path, d, c, maps); - for(usize i=0;i 0 ) + if(!map_handle_err(map_free(* (--maps)))) WARN("Failed to free map at %p (in %lu unwind)", maps, d); return 0; } d+=1;