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.

PR-URL: nodejs#12365
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
mhdawson authored and addaleax committed Apr 14, 2017
1 parent ad5f987 commit 46f2026
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/node_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2664,6 +2664,7 @@ class Work {
_data(data),
_execute(execute),
_complete(complete) {
memset(&_request, 0, sizeof(_request));
_request.data = this;
}

Expand Down

0 comments on commit 46f2026

Please sign in to comment.