Browse Source

n-api: fix coverity scan report

Coverity was reporting _request.work_req as not being initialized.
Add memset to ensure all of _request is initialized.

PR-URL: https://github.com/nodejs/node/pull/12365
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
v6
Michael Dawson 8 years ago
committed by Anna Henningsen
parent
commit
46f202690b
No known key found for this signature in database GPG Key ID: D8B9F5AEAE84E4CF
  1. 1
      src/node_api.cc

1
src/node_api.cc

@ -2664,6 +2664,7 @@ class Work {
_data(data),
_execute(execute),
_complete(complete) {
memset(&_request, 0, sizeof(_request));
_request.data = this;
}

Loading…
Cancel
Save