Index: /trunk/include/VBox/com/string.h
===================================================================
--- /trunk/include/VBox/com/string.h	(revision 23906)
+++ /trunk/include/VBox/com/string.h	(revision 23907)
@@ -230,5 +230,9 @@
         if (pstr)
         {
-            *pstr = NULL;
+            if (*pstr)
+            {
+                ::SysFreeString (*pstr);
+                *pstr = NULL;
+            }
             raw_copy (*pstr, bstr);
         }
@@ -412,5 +416,9 @@
         if (pstr)
         {
-            *pstr = NULL;
+            if (*pstr)
+            {
+                ::SysFreeString (*pstr);
+                *pstr = NULL;
+            }
             Bstr::raw_copy(*pstr, m_psz);
         }
