Index: /trunk/Nebulous-Server/lib/Nebulous/Server.pm
===================================================================
--- /trunk/Nebulous-Server/lib/Nebulous/Server.pm	(revision 16183)
+++ /trunk/Nebulous-Server/lib/Nebulous/Server.pm	(revision 16184)
@@ -1,5 +1,5 @@
 # Copyright (c) 2004  Joshua Hoblitt
 #
-# $Id: Server.pm,v 1.45 2007-05-09 00:45:21 jhoblitt Exp $
+# $Id: Server.pm,v 1.46 2008-01-23 00:46:06 jhoblitt Exp $
 
 package Nebulous::Server;
@@ -928,4 +928,5 @@
 
             unless ( $rows > 0 ) {
+                $query->finish;
                 $log->logdie( "no instance is associated with uri" );
             }
@@ -933,4 +934,5 @@
             $so_id = $query->fetchrow_hashref->{ 'so_id' };
             $query->finish;
+
         }
 
@@ -947,4 +949,5 @@
             my $query = $db->prepare_cached( $sql->delete_instance );
             my $rows = $query->execute( $uri );
+            $query->finish;
             
             # if we affected something other then one row something very bad
@@ -961,4 +964,5 @@
             my $query = $db->prepare_cached( $sql->delete_object );
             my $rows = $query->execute( $so_id );
+            $query->finish;
 
             # if we affected something other then two rows something very bad
Index: /trunk/Nebulous/lib/Nebulous/Server.pm
===================================================================
--- /trunk/Nebulous/lib/Nebulous/Server.pm	(revision 16183)
+++ /trunk/Nebulous/lib/Nebulous/Server.pm	(revision 16184)
@@ -1,5 +1,5 @@
 # Copyright (c) 2004  Joshua Hoblitt
 #
-# $Id: Server.pm,v 1.45 2007-05-09 00:45:21 jhoblitt Exp $
+# $Id: Server.pm,v 1.46 2008-01-23 00:46:06 jhoblitt Exp $
 
 package Nebulous::Server;
@@ -928,4 +928,5 @@
 
             unless ( $rows > 0 ) {
+                $query->finish;
                 $log->logdie( "no instance is associated with uri" );
             }
@@ -933,4 +934,5 @@
             $so_id = $query->fetchrow_hashref->{ 'so_id' };
             $query->finish;
+
         }
 
@@ -947,4 +949,5 @@
             my $query = $db->prepare_cached( $sql->delete_instance );
             my $rows = $query->execute( $uri );
+            $query->finish;
             
             # if we affected something other then one row something very bad
@@ -961,4 +964,5 @@
             my $query = $db->prepare_cached( $sql->delete_object );
             my $rows = $query->execute( $so_id );
+            $query->finish;
 
             # if we affected something other then two rows something very bad
