Commit 53296e8a authored by Gabriel Schulhof's avatar Gabriel Schulhof
Browse files

n-api: guard against cond null dereference

A condition variable is only created by the thread-safe function if the
queue size is set to something larger than zero. This adds null-checks
around the condition variable and tests for the case where the queue
size is zero.

Fixes: https://github.com/nodejs/help/issues/1387
PR-URL: https://github.com/nodejs/node/pull/21871


Reviewed-By: default avatarBenjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarMichael Dawson <michael_dawson@ca.ibm.com>
parent b38b8d3b
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment