Skip to content

Commit

Permalink
n-api: fix coverity scan report
Browse files Browse the repository at this point in the history
Coverity was reporting _request.work_req as not being initialized.
Add memset to ensure all of _request is initialized.

Backport-PR-URL: #19447
PR-URL: #12365
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
mhdawson authored and MylesBorins committed Apr 16, 2018
1 parent 9bf8e9d commit c44f6ff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/node_api.cc
Expand Up @@ -2666,6 +2666,7 @@ class Work {
_data(data),
_execute(execute),
_complete(complete) {
memset(&_request, 0, sizeof(_request));
_request.data = this;
}

Expand Down

0 comments on commit c44f6ff

Please sign in to comment.