$OpenBSD: patch-src_ptlib_unix_config_cxx,v 1.1 2008/07/01 08:22:12 ajacoutot Exp $
--- src/ptlib/unix/config.cxx.orig	Fri Oct 19 08:22:32 2007
+++ src/ptlib/unix/config.cxx	Tue Jul  1 10:09:52 2008
@@ -546,9 +546,10 @@ void PXConfigDictionary::RemoveInstance(PXConfig * ins
     PINDEX index = GetObjectsIndex(instance);
     PAssert(index != P_MAX_INDEX, "Cannot find PXConfig instance to remove");
 
-    // decrement the instance count, but don't remove it yet
+    // decrement the instance count and remove it if this was the last instance
     PFilePath key = GetKeyAt(index);
-    instance->RemoveInstance(key);
+    if (instance->RemoveInstance(key))
+		RemoveAt(key);
   }
 
   mutex.Signal();
