Bug 1167249: Use delete[] instead of delete to deallocate some arrays in mochitest ssltunnel.cpp. r=ted
authorDaniel Holbert <dholbert@cs.stanford.edu>
Fri, 22 May 2015 12:47:02 -0700
changeset 245232 d4387922c1026b998ab94553ef0eeda9b2bd4edf
parent 245231 5f209a3d06e3ac3a5cf4214791de0a377938ad05
child 245233 269a9ed2095058ff546c3b0a61c44c9302b6d43e
push id28799
push userphilringnalda@gmail.com
push dateSat, 23 May 2015 20:31:44 +0000
treeherdermozilla-central@c3c0928c3cde [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1167249
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1167249: Use delete[] instead of delete to deallocate some arrays in mochitest ssltunnel.cpp. r=ted
testing/mochitest/ssltunnel/ssltunnel.cpp
--- a/testing/mochitest/ssltunnel/ssltunnel.cpp
+++ b/testing/mochitest/ssltunnel/ssltunnel.cpp
@@ -1313,18 +1313,18 @@ int processConfigLine(char* configLine)
       strcat(hostname_copy, ":");
       strcat(hostname_copy, hostportstring);
 
       char *redir_copy = new char[strlen(redirhoststring)+1];
       strcpy(redir_copy, redirhoststring);
       PLHashEntry* entry = PL_HashTableAdd(existingServer->host_redir_table, hostname_copy, redir_copy);
       if (!entry) {
         LOG_ERROR(("Out of memory"));
-        delete hostname_copy;
-        delete redir_copy;
+        delete[] hostname_copy;
+        delete[] redir_copy;
         return 1;
       }
     }
     else
     {
       LOG_ERROR(("Server on port %d for redirhost option is not defined, use 'listen' option first", port));
       return 1;
     }