From: Danny Al-Gaaf Date: Tue, 26 Feb 2013 14:54:19 +0000 (+0100) Subject: CephxProtocol.cc: catch error by reference X-Git-Tag: v0.59~95^2~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bf10e5e948856129551bc571d6a77aeedc40141f;p=ceph.git 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 --- diff --git a/src/auth/cephx/CephxProtocol.h b/src/auth/cephx/CephxProtocol.h index 9386a410f95..19f4f230353 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())