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