Index: /trunk/src/VBox/VMM/VMMR0/GMMR0.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR0/GMMR0.cpp	(revision 29477)
+++ /trunk/src/VBox/VMM/VMMR0/GMMR0.cpp	(revision 29478)
@@ -3665,4 +3665,6 @@
                             RTMemFree(pRec->aRegions[i].paHCPhysPageID);
 
+                    /* Remove from the tree and free memory. */
+                    RTAvlGCPtrRemove(&pGMM->pGlobalSharedModuleTree, GCBaseAddr);
                     RTMemFree(pRec);
                 }
@@ -3674,4 +3676,6 @@
             Assert(!pRecVM->pGlobalModule);
 
+        /* Remove from the tree and free memory. */
+        RTAvlGCPtrRemove(&pGVM->gmm.s.pSharedModuleTree, GCBaseAddr);
         RTMemFree(pRecVM);
 
