]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1207] fix two memory/cast issues in modified code
authorJelte Jansen <jelte@isc.org>
Fri, 11 May 2012 13:32:48 +0000 (06:32 -0700)
committerJelte Jansen <jelte@isc.org>
Fri, 11 May 2012 13:32:48 +0000 (06:32 -0700)
See http://bind10.isc.org/ticket/1207#comment:11

src/bin/auth/command.cc
src/bin/auth/tests/auth_srv_unittest.cc

index bd4c1c142547f8b7dfefcc37e527fcc1e75f6863..12f0b2bd08d2216c3f625be789db3afdb21190de 100644 (file)
@@ -229,7 +229,7 @@ private:
                       " is not found in data source");
         }
 
-        old_zone_finder_ = boost::dynamic_pointer_cast<InMemoryZoneFinder>(
+        old_zone_finder_ = boost::static_pointer_cast<InMemoryZoneFinder>(
             result.zone_finder);
 
         return (true);
index ac762e8e249c5071285aceb8ab69617420617939..c7f08be9936a80a3cbb0d30947ab27820dcc0e3b 100644 (file)
@@ -89,6 +89,10 @@ protected:
         server.setStatisticsSession(&statistics_session);
     }
 
+    ~AuthSrvTest() {
+        parse_message->clear(Message::PARSE);
+    }
+
     virtual void processMessage() {
         // If processMessage has been called before, parse_message needs
         // to be reset. If it hasn't, there's no harm in doing so