From bf10e5e948856129551bc571d6a77aeedc40141f Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Tue, 26 Feb 2013 15:54:19 +0100 Subject: [PATCH] CephxProtocol.cc: catch error by reference Follow 'Throw by value, catch by reference' to void copying and potential slicing the exception. Signed-off-by: Danny Al-Gaaf --- src/auth/cephx/CephxProtocol.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/auth/cephx/CephxProtocol.h b/src/auth/cephx/CephxProtocol.h index 9386a410f95d8..19f4f23035339 100644 --- a/src/auth/cephx/CephxProtocol.h +++ b/src/auth/cephx/CephxProtocol.h @@ -474,7 +474,7 @@ int decode_decrypt(CephContext *cct, T& t, const CryptoKey& key, ::decode(bl_enc, iter); decode_decrypt_enc_bl(cct, t, key, bl_enc, error); } - catch (buffer::error e) { + catch (buffer::error &e) { error = "error decoding block for decryption"; } if (!error.empty()) -- 2.39.5