]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
CephxProtocol.cc: catch error by reference
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 26 Feb 2013 14:54:19 +0000 (15:54 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 26 Feb 2013 14:54:19 +0000 (15:54 +0100)
Follow 'Throw by value, catch by reference' to void copying and
potential slicing the exception.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/auth/cephx/CephxProtocol.h

index 9386a410f95d8e0706bd67c474535c35511f94fe..19f4f23035339ff8468e9b1456684c74fcd7d457 100644 (file)
@@ -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())