Skip to content

Commit 830670a

Browse files
committed
Add uv_fs_req_cleanup
1 parent b0e6128 commit 830670a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/uvwasi.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1452,10 +1452,13 @@ uvwasi_errno_t uvwasi_fd_readdir(uvwasi_t* uvwasi,
14521452
uv_fs_req_cleanup(&req);
14531453
goto exit;
14541454
}
1455+
1456+
cur_cookie += (uvwasi_dircookie_t)r;
1457+
uv_fs_req_cleanup(&req);
1458+
14551459
if (r == 0) {
14561460
break;
14571461
}
1458-
cur_cookie += (uvwasi_dircookie_t)r;
14591462
}
14601463

14611464
/* Read the directory entries into the provided buffer. */

0 commit comments

Comments
 (0)