[FIX] memory leaks (new [])
authorNikita Kalyazin <n.kalyazin@samsung.com>
Thu, 31 Oct 2013 11:16:26 +0000 (15:16 +0400)
committerNikita Kalyazin <n.kalyazin@samsung.com>
Thu, 31 Oct 2013 11:16:26 +0000 (15:16 +0400)
Change-Id: I35aab19289d4e40e74a2c5374f2b6d90c0b779e9
Signed-off-by: Nikita Kalyazin <n.kalyazin@samsung.com>
probe_tizenapi/tizen_http.cpp
probe_tizenapi/tizen_socket.cpp

index ef7a934..22274e7 100755 (executable)
@@ -312,7 +312,7 @@ Tizen::Base::String* HttpHeader::GetRawHeaderN(void) const
        AFTER_ORIGINAL_TIZEN_SOCK("HttpHeader::GetRawHeaderN", VT_NULL, NULL,
                        (unsigned int)this, (unsigned int)this, HTTP_API_RESPONSE, out,
                        retVal->GetLength(), hostinfo, "s", "void");
-       delete out;
+       delete [] out;
        return retVal;
 }
 
@@ -1271,7 +1271,7 @@ result HttpRequest::WriteBody(const Tizen::Base::ByteBuffer& body)
        AFTER_ORIGINAL_TIZEN_SOCK("HttpRequest::WriteBody", VT_ULONG, retVal,
                        (unsigned int)this, (unsigned int)this, HTTP_API_REQUEST, out,
                        body.GetLimit(), hostinfo, "x", (unsigned int)&body);
-       delete out;
+       delete [] out;
        return retVal;
 }
 
index 9afb7ad..16b8e4f 100644 (file)
@@ -621,7 +621,7 @@ result Socket::Receive(Tizen::Base::ByteBuffer& buffer) const {
        AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_END("Socket::Receive", VT_ULONG, pret,
                        (unsigned int)this, (unsigned int)this, SOCKET_API_RECV_END, out,
                        buffer.GetLimit(), hostinfo, "x", (unsigned int)&buffer);
-       delete out;
+       delete [] out;
        return pret;
 }
 
@@ -695,7 +695,7 @@ result Socket::ReceiveFrom(Tizen::Base::ByteBuffer& buffer,
                        pret, (unsigned int)this, (unsigned int)this, SOCKET_API_RECV_END,
                        out, buffer.GetLimit(), hostinfo, "xs",
                        (unsigned int)&buffer, temp);
-       delete out;
+       delete [] out;
        return pret;
 }
 result Socket::ReceiveFrom(void* pBuffer, int length,
@@ -762,7 +762,7 @@ result Socket::Send(Tizen::Base::ByteBuffer& buffer) {
        AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_END("Socket::Send", VT_ULONG, pret,
                        (unsigned int)this, (unsigned int)this, SOCKET_API_SEND_END, out,
                        buffer.GetLimit(), hostinfo, "x", (unsigned int)&buffer);
-       delete out;
+       delete [] out;
        return pret;
 }
 
@@ -835,7 +835,7 @@ result Socket::SendTo(Tizen::Base::ByteBuffer& buffer,
        AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_END("Socket::SendTo", VT_ULONG, pret,
                        (unsigned int)this, (unsigned int)this, SOCKET_API_SEND_END, out,
                        buffer.GetLimit(), hostinfo, "xs", (unsigned int)&buffer, temp);
-       delete out;
+       delete [] out;
        return pret;
 }