You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2011/06/05 11:25:14 UTC
svn commit: r1132326 - /incubator/mesos/trunk/third_party/libprocess/pid.cpp
Author: benh
Date: Sun Jun 5 09:25:14 2011
New Revision: 1132326
URL: http://svn.apache.org/viewvc?rev=1132326&view=rev
Log:
Updated a 'delete' to 'delete[]'
Modified:
incubator/mesos/trunk/third_party/libprocess/pid.cpp
Modified: incubator/mesos/trunk/third_party/libprocess/pid.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/third_party/libprocess/pid.cpp?rev=1132326&r1=1132325&r2=1132326&view=diff
==============================================================================
--- incubator/mesos/trunk/third_party/libprocess/pid.cpp (original)
+++ incubator/mesos/trunk/third_party/libprocess/pid.cpp Sun Jun 5 09:25:14 2011
@@ -125,7 +125,7 @@ istream& operator >> (istream& stream, U
while ((result = gethostbyname2_r(host.c_str(), AF_INET, &he,
temp, length, &hep, &herrno)) == ERANGE) {
// Enlarge the buffer.
- delete temp;
+ delete[] temp;
length *= 2;
temp = new char[length];
}
@@ -134,20 +134,20 @@ istream& operator >> (istream& stream, U
VLOG(2) << "Failed to parse host '" << host
<< "' because " << hstrerror(herrno);
stream.setstate(std::ios_base::badbit);
- delete temp;
+ delete[] temp;
return stream;
}
if (hep->h_addr_list[0] == NULL) {
VLOG(2) << "Got no addresses for '" << host << "'";
stream.setstate(std::ios_base::badbit);
- delete temp;
+ delete[] temp;
return stream;
}
ip = *((uint32_t*) hep->h_addr_list[0]);
- delete temp;
+ delete[] temp;
str = str.substr(index + 1);