Skip to content

Commit

Permalink
fix luvit#603
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaozg committed Jun 1, 2022
1 parent 02d703b commit ad49193
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ static uv_fs_t* luv_check_fs(lua_State* L, int index) {

static int luv_fs_gc(lua_State* L) {
uv_fs_t* req = luv_check_fs(L, 1);
luv_cleanup_req(L, (luv_req_t*)req->data);
req->data = NULL;
if (req->data)
{
luv_cleanup_req(L, (luv_req_t*)req->data);
req->data = NULL;
}
uv_fs_req_cleanup(req);
return 0;
}
Expand Down

0 comments on commit ad49193

Please sign in to comment.