Index: /trunk/src/VBox/Main/ConsoleImpl2.cpp
===================================================================
--- /trunk/src/VBox/Main/ConsoleImpl2.cpp	(revision 22866)
+++ /trunk/src/VBox/Main/ConsoleImpl2.cpp	(revision 22867)
@@ -823,4 +823,5 @@
         cModes++;
     }
+    STR_FREE();
     rc = CFGMR3InsertInteger(pCfg,  "CustomVideoModes", cModes);
 
@@ -2859,5 +2860,6 @@
         AssertMsgReturn(SUCCEEDED(hrc), ("hrc=%#x\n", hrc),
                         VERR_GENERAL_FAILURE);
-        size_t cProps = namesOut.size(), cAlloc = cProps + 1;
+        size_t cProps = namesOut.size();
+        size_t cAlloc = cProps + 1;
         if (   valuesOut.size() != cProps
             || timestampsOut.size() != cProps
