Index: /trunk/src/VBox/Runtime/testcase/tstRTStrSplit.cpp
===================================================================
--- /trunk/src/VBox/Runtime/testcase/tstRTStrSplit.cpp	(revision 85347)
+++ /trunk/src/VBox/Runtime/testcase/tstRTStrSplit.cpp	(revision 85348)
@@ -32,4 +32,5 @@
 
 #include <iprt/test.h>
+#include <iprt/mem.h>
 #include <iprt/stream.h>
 
@@ -51,8 +52,15 @@
     size_t cStrings = 0;
 
+#define DO_CLEANUP() \
+    for (size_t i = 0; i < cStrings; ++i) \
+        RTStrFree(papszStrings[i]); \
+    RTMemFree(papszStrings);
+    cStrings = 0;
+
     /* Empty stuff. */
     const char szEmpty[] = "";
     RTTEST_CHECK_RC(hTest, RTStrSplit(szEmpty, sizeof(szEmpty), "\r\n", &papszStrings, &cStrings), VINF_SUCCESS);
     RTTEST_CHECK(hTest, cStrings == 0);
+    DO_CLEANUP();
 
     /* No separator given. */
@@ -61,4 +69,5 @@
     RTTEST_CHECK(hTest, cStrings == 1);
     RTTEST_CHECK(hTest, RTStrICmp(papszStrings[0], "foo") == 0);
+    DO_CLEANUP();
 
     /* Single string w/ separator. */
@@ -67,4 +76,5 @@
     RTTEST_CHECK(hTest, cStrings == 1);
     RTTEST_CHECK(hTest, papszStrings && RTStrICmp(papszStrings[0], "foo") == 0);
+    DO_CLEANUP();
 
     /* Multiple strings w/ separator. */
@@ -76,4 +86,5 @@
                         && RTStrICmp(papszStrings[0], "foo") == 0
                         && RTStrICmp(papszStrings[1], "bar") == 0);
+    DO_CLEANUP();
 
     /* Multiple strings w/ two consequtive separators. */
@@ -85,4 +96,5 @@
                         && RTStrICmp(papszStrings[0], "foo") == 0
                         && RTStrICmp(papszStrings[1], "bar") == 0);
+    DO_CLEANUP();
 
     /* Multiple strings w/ two consequtive separators. */
@@ -95,4 +107,5 @@
                         && RTStrICmp(papszStrings[1], "bar") == 0
                         && RTStrICmp(papszStrings[2], "baz") == 0);
+    DO_CLEANUP();
 
     /* Multiple strings w/ trailing separators. */
@@ -105,4 +118,8 @@
                         && RTStrICmp(papszStrings[1], "bar") == 0
                         && RTStrICmp(papszStrings[2], "baz") == 0);
+    DO_CLEANUP();
+
+#undef DO_CLEANUP
+
     /*
      * Summary.
