Index: /trunk/src/VBox/Runtime/testcase/tstHttp.cpp
===================================================================
--- /trunk/src/VBox/Runtime/testcase/tstHttp.cpp	(revision 45365)
+++ /trunk/src/VBox/Runtime/testcase/tstHttp.cpp	(revision 45366)
@@ -211,5 +211,4 @@
                        "https://update.virtualbox.org/query.php?platform=LINUX_32BITS_UBUNTU_12_04&version=4.1.18",
                        &pszBuf);
-    RTHttpDestroy(hHttp);
 
     if (RT_FAILURE(rc))
@@ -221,5 +220,11 @@
         RTPrintf("Success!\n");
     RTPrintf("Got: %s\n", pszBuf);
-    RTMemFree(pszBuf);
+    if (pszBuf)
+    {
+        RTMemFree(pszBuf);
+        pszBuf = NULL;
+    }
+
+    RTHttpDestroy(hHttp);
 
 //    RTFileDelete(CAFILE_NAME);
