Browse Source

[2124] don't keep a reference to a temporary object.

'rdf' in the original code immediately became dangling reference.
JINMEI Tatuya 12 years ago
parent
commit
26401e4e86
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/lib/dns/tests/rdata_sshfp_unittest.cc

+ 1 - 1
src/lib/dns/tests/rdata_sshfp_unittest.cc

@@ -183,7 +183,7 @@ TEST_F(Rdata_SSHFP_Test, getFingerprintLen) {
 }
 
 TEST_F(Rdata_SSHFP_Test, emptyFingerprintFromWire) {
-    const generic::SSHFP& rdf =
+    const generic::SSHFP rdf =
         dynamic_cast<const generic::SSHFP&>
         (*rdataFactoryFromFile(RRType("SSHFP"), RRClass("IN"),
                                "rdata_sshfp_fromWire12"));