Added missing error checking in the C API.
pthread_mutex_init(3) may fail for several reasons, and failing to check will cause Undefined Behavior when those errors happen. Add missing checks, and correctly deinitialize previously created stuff before exiting from the API. Signed-off-by: Alejandro Colomar <alx@nginx.com> Reviewed-by: Andrew Clayton <a.clayton@nginx.com> Reviewed-by: Zhidao HONG <z.hong@f5.com>
This commit is contained in:
committed by
Alejandro Colomar
parent
f8b892e1fa
commit
f2213dbd1b
@@ -177,7 +177,7 @@ the Ruby application process could crash on SIGINT.
|
||||
|
||||
<change type="bugfix">
|
||||
<para>
|
||||
mutex leak in the C API.
|
||||
mutex leaks in the C API.
|
||||
</para>
|
||||
</change>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user