Network slave bookkeeping fixup
authorPaul Park <pjpark@mit.edu>
Wed, 9 Aug 1995 21:25:56 +0000 (21:25 +0000)
committerPaul Park <pjpark@mit.edu>
Wed, 9 Aug 1995 21:25:56 +0000 (21:25 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6488 dc483132-0cff-0310-8789-dd5450dbe970

src/kadmin/v5server/srv_net.c

index 29c421a0a3595c4c007946a9457a6e714a44ec3b..1fa3e507e554fd542a704ae3f8aa72ac04796d88 100644 (file)
@@ -420,7 +420,7 @@ net_dispatch_client(kcontext, listen_sock, conn_sock, client_addr)
                          &slent->sl_local_addr,
                          &slent->sl_remote_addr);
        sl1 = net_find_slave(slent->sl_id);
-       if (!sl1)
+       if (sl1)
            net_free_slave_entry(sl1);
        DPRINT(DEBUG_SPROC, net_debug_level,
               ("| (%d) returned with %d\n", getpid(), kret));
@@ -683,8 +683,10 @@ net_finish(kcontext, debug_level)
     int                        debug_level;
 {
     DPRINT(DEBUG_CALLS, net_debug_level, ("* net_finish()\n"));
-    if (net_max_slaves)
+    if (net_max_slaves) {
+       net_max_slaves = 0;
        free(net_slave_table);
+    }
     if (net_listen_socket >= 0)
        close(net_listen_socket);
     if (net_service_princ_init)