Skip to content
Permalink
Browse files

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: #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 addaleax committed Apr 12, 2017
1 parent ad5f987 commit 46f202690b83bda6ba4b49291a8fd107f7ef1496
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/node_api.cc
@@ -2664,6 +2664,7 @@ class Work {
_data(data),
_execute(execute),
_complete(complete) {
memset(&_request, 0, sizeof(_request));
_request.data = this;
}

0 comments on commit 46f2026

Please sign in to comment.
You can’t perform that action at this time.