mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-14 01:37:56 +08:00
improved null checking in zmq_term
This commit is contained in:
parent
b608c19c5a
commit
43f2c6ff5b
1
AUTHORS
1
AUTHORS
@ -15,6 +15,7 @@ Erik Rigtorp <erik@rigtorp.com>
|
||||
Frank Denis <zeromq@pureftpd.org>
|
||||
George Neill <georgen@neillnet.com>
|
||||
Gonzalo Diethelm <gdiethelm@dcv.cl>
|
||||
Ivo Danihelka <ivo@danihelka.net>
|
||||
Joe Thornber <joe.thornber@gmail.com>
|
||||
Jon Dyte <jon@totient.co.uk>
|
||||
Kamil Shakirov <kamils80@gmail.com>
|
||||
|
@ -269,13 +269,14 @@ void *zmq_init (int io_threads_)
|
||||
|
||||
int zmq_term (void *ctx_)
|
||||
{
|
||||
int rc = ((zmq::ctx_t*) ctx_)->terminate ();
|
||||
int en = errno;
|
||||
|
||||
if (!ctx_) {
|
||||
errno = EFAULT;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int rc = ((zmq::ctx_t*) ctx_)->terminate ();
|
||||
int en = errno;
|
||||
|
||||
#if defined ZMQ_HAVE_OPENPGM
|
||||
// Shut down the OpenPGM library.
|
||||
if (pgm_shutdown () != TRUE)
|
||||
|
Loading…
x
Reference in New Issue
Block a user