Browse Source

[1207] fix two memory/cast issues in modified code

See http://bind10.isc.org/ticket/1207#comment:11
Jelte Jansen 13 years ago
parent
commit
c17d922ffe
2 changed files with 5 additions and 1 deletions
  1. 1 1
      src/bin/auth/command.cc
  2. 4 0
      src/bin/auth/tests/auth_srv_unittest.cc

+ 1 - 1
src/bin/auth/command.cc

@@ -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);

+ 4 - 0
src/bin/auth/tests/auth_srv_unittest.cc

@@ -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