Use delete foo; instead of GSocket_destroy(foo);
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28682 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -466,7 +466,7 @@ GSocket *GSocket::WaitConnection()
|
|||||||
/* Wait for a connection (with timeout) */
|
/* Wait for a connection (with timeout) */
|
||||||
if (Input_Timeout() == GSOCK_TIMEDOUT)
|
if (Input_Timeout() == GSOCK_TIMEDOUT)
|
||||||
{
|
{
|
||||||
GSocket_destroy(connection);
|
delete connection;
|
||||||
/* m_error set by _GSocket_Input_Timeout */
|
/* m_error set by _GSocket_Input_Timeout */
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -480,7 +480,7 @@ GSocket *GSocket::WaitConnection()
|
|||||||
else
|
else
|
||||||
m_error = GSOCK_IOERR;
|
m_error = GSOCK_IOERR;
|
||||||
|
|
||||||
GSocket_destroy(connection);
|
delete connection;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -492,7 +492,7 @@ GSocket *GSocket::WaitConnection()
|
|||||||
connection->m_peer = GAddress_new();
|
connection->m_peer = GAddress_new();
|
||||||
if (!connection->m_peer)
|
if (!connection->m_peer)
|
||||||
{
|
{
|
||||||
GSocket_destroy(connection);
|
delete connection;
|
||||||
m_error = GSOCK_MEMERR;
|
m_error = GSOCK_MEMERR;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -500,7 +500,7 @@ GSocket *GSocket::WaitConnection()
|
|||||||
if (err != GSOCK_NOERROR)
|
if (err != GSOCK_NOERROR)
|
||||||
{
|
{
|
||||||
GAddress_destroy(connection->m_peer);
|
GAddress_destroy(connection->m_peer);
|
||||||
GSocket_destroy(connection);
|
delete connection;
|
||||||
m_error = err;
|
m_error = err;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@@ -542,7 +542,7 @@ GSocket *GSocket::WaitConnection()
|
|||||||
/* Wait for a connection (with timeout) */
|
/* Wait for a connection (with timeout) */
|
||||||
if (Input_Timeout() == GSOCK_TIMEDOUT)
|
if (Input_Timeout() == GSOCK_TIMEDOUT)
|
||||||
{
|
{
|
||||||
GSocket_destroy(connection);
|
delete connection;
|
||||||
/* m_error set by _GSocket_Input_Timeout */
|
/* m_error set by _GSocket_Input_Timeout */
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -556,7 +556,7 @@ GSocket *GSocket::WaitConnection()
|
|||||||
else
|
else
|
||||||
m_error = GSOCK_IOERR;
|
m_error = GSOCK_IOERR;
|
||||||
|
|
||||||
GSocket_destroy(connection);
|
delete connection;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -568,7 +568,7 @@ GSocket *GSocket::WaitConnection()
|
|||||||
connection->m_peer = GAddress_new();
|
connection->m_peer = GAddress_new();
|
||||||
if (!connection->m_peer)
|
if (!connection->m_peer)
|
||||||
{
|
{
|
||||||
GSocket_destroy(connection);
|
delete connection;
|
||||||
m_error = GSOCK_MEMERR;
|
m_error = GSOCK_MEMERR;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -576,7 +576,7 @@ GSocket *GSocket::WaitConnection()
|
|||||||
if (err != GSOCK_NOERROR)
|
if (err != GSOCK_NOERROR)
|
||||||
{
|
{
|
||||||
GAddress_destroy(connection->m_peer);
|
GAddress_destroy(connection->m_peer);
|
||||||
GSocket_destroy(connection);
|
delete connection;
|
||||||
m_error = err;
|
m_error = err;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user