Index: /trunk/src/VBox/Additions/x11/VBoxClient/seamless-x11.cpp
===================================================================
--- /trunk/src/VBox/Additions/x11/VBoxClient/seamless-x11.cpp	(revision 86393)
+++ /trunk/src/VBox/Additions/x11/VBoxClient/seamless-x11.cpp	(revision 86394)
@@ -70,9 +70,9 @@
 
 /**
-  * Initialise the guest and ensure that it is capable of handling seamless mode
-  *
-  * @param  pHostCallback   host callback.
-  * @returns true if it can handle seamless, false otherwise
-  */
+ * Initialise the guest and ensure that it is capable of handling seamless mode
+ *
+ * @param  pHostCallback   host callback.
+ * @returns true if it can handle seamless, false otherwise
+ */
 int SeamlessX11::init(PFNSENDREGIONUPDATE pHostCallback)
 {
@@ -95,4 +95,22 @@
     LogRelFlowFuncLeaveRC(rc);
     return rc;
+}
+
+/**
+ * Shutdown seamless event monitoring.
+ */
+void SeamlessX11::uninit(void)
+{
+    if (mHostCallback)
+        stop();
+    mHostCallback = NULL;
+    if (mDisplay)
+        XCloseDisplay(mDisplay);
+    mDisplay = NULL;
+    if (mpRects)
+    {
+        RTMemFree(mpRects);
+        mpRects = NULL;
+    }
 }
 
Index: /trunk/src/VBox/Additions/x11/VBoxClient/seamless-x11.h
===================================================================
--- /trunk/src/VBox/Additions/x11/VBoxClient/seamless-x11.h	(revision 86393)
+++ /trunk/src/VBox/Additions/x11/VBoxClient/seamless-x11.h	(revision 86394)
@@ -224,13 +224,5 @@
      * Shutdown seamless event monitoring.
      */
-    void uninit(void)
-    {
-        if (mHostCallback)
-            stop();
-        mHostCallback = NULL;
-        if (mDisplay)
-            XCloseDisplay(mDisplay);
-        mDisplay = NULL;
-    }
+    void uninit(void);
 
     /**
