Merge pull request #870 from hintjens/master

Fixed issue #868
Fix potential segmentation fault

Call the allocation assertion macro before dereferencing the socket
pointer.
Fix potential memory leak

Delete the socket if the initialization part of the socket creation
fails.
Merge pull request #871 from apyrgio/develop

Fix potential segfault/memleak
Added ZMQ_BUILD_TESTS to CMakeLists.txt to allow turning off tests. Useful when building ZMQ as a git submodule.
Merge pull request #874 from gyulalaszlo/cmake-switchable-tests

Added ZMQ_BUILD_TESTS to CMakeLists.txt to allow turning off tests.
Fix identity handling for inproc transport

Fixes #872
Merge pull request #876 from hurtonm/master

Fix identity handling for inproc transport
Revert "Fix potential memory leak"

This reverts commit 50d34e5653ade4f3f1623c86f1426aeb746ae564.