From: JINMEI Tatuya Date: Wed, 15 May 2013 18:31:57 +0000 (-0700) Subject: [2916] corrected handling of aux socket wrt exception safety X-Git-Tag: bind10-1.2.0beta1-release~453^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7185b57ec3dfe44fb5ed0188e6234725cfb8fff0;p=thirdparty%2Fkea.git [2916] corrected handling of aux socket wrt exception safety --- diff --git a/src/lib/asiolink/tests/local_socket_unittest.cc b/src/lib/asiolink/tests/local_socket_unittest.cc index 57828d0b0f..b851ca3ad1 100644 --- a/src/lib/asiolink/tests/local_socket_unittest.cc +++ b/src/lib/asiolink/tests/local_socket_unittest.cc @@ -200,7 +200,8 @@ TEST_F(LocalSocketTest, asyncPartialRead) { ScopedSocket aux_sockpair[2]; aux_sockpair[0].set(socks[0]); aux_sockpair[1].set(socks[1]); - LocalSocket aux_sock(io_service_, aux_sockpair[0].release()); + LocalSocket aux_sock(io_service_, aux_sockpair[0].get()); + aux_sockpair[0].release(); // on successful construction we should release bool aux_callback_called = false; aux_sock.asyncRead(boost::bind(&callback, _1, &io_service_, &aux_callback_called, false), &ch, 1);