Skip to content

src: clean up uv_fs_t's in module_wrap.cc

Rodrigo Muino Tomonari requested to merge github/fork/cjihrig/cleanup into master

This commit adds uv_fs_req_cleanup() calls to all uses of uv_fs_t's in src/module_wrap.cc.

Note, this originally started as a response to a Coverity scan:

>>>     CID 178567:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "uv_fs_read" without checking return value (as is done elsewhere 4 out of 5 times).
314         uv_fs_read(uv_default_loop(),

I fixed the Coverity issue by using the return value from uv_fs_read() instead of req.result.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

src

Merge request reports

Loading