From d9011de87157508fcff832585b4a5593c1fee05d Mon Sep 17 00:00:00 2001 From: Nikita Kalyazin Date: Thu, 31 Oct 2013 15:16:26 +0400 Subject: [PATCH] [FIX] memory leaks (new []) Change-Id: I35aab19289d4e40e74a2c5374f2b6d90c0b779e9 Signed-off-by: Nikita Kalyazin --- probe_tizenapi/tizen_http.cpp | 4 ++-- probe_tizenapi/tizen_socket.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/probe_tizenapi/tizen_http.cpp b/probe_tizenapi/tizen_http.cpp index ef7a934..22274e7 100755 --- a/probe_tizenapi/tizen_http.cpp +++ b/probe_tizenapi/tizen_http.cpp @@ -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; } diff --git a/probe_tizenapi/tizen_socket.cpp b/probe_tizenapi/tizen_socket.cpp index 9afb7ad..16b8e4f 100644 --- a/probe_tizenapi/tizen_socket.cpp +++ b/probe_tizenapi/tizen_socket.cpp @@ -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; } -- 2.7.4