Fixed double free.

This commit is contained in:
Armin Novak 2013-09-06 11:07:33 +02:00
parent c986f30c4a
commit 4e0c7d251d

View File

@ -293,7 +293,10 @@ BOOL nego_send_preconnection_pdu(rdpNego* nego)
Stream_SealLength(s);
if (transport_write(nego->transport, s) < 0)
{
Stream_Free(s, TRUE);
return FALSE;
}
Stream_Free(s, TRUE);
@ -486,7 +489,6 @@ BOOL nego_recv_response(rdpNego* nego)
if (status < 0)
return FALSE;
Stream_Free(s, TRUE);
return TRUE;
}
@ -712,7 +714,10 @@ BOOL nego_send_negotiation_request(rdpNego* nego)
Stream_SealLength(s);
if (transport_write(nego->transport, s) < 0)
{
Stream_Free(s, TRUE);
return FALSE;
}
Stream_Free(s, TRUE);
@ -871,7 +876,10 @@ BOOL nego_send_negotiation_response(rdpNego* nego)
Stream_SealLength(s);
if (transport_write(nego->transport, s) < 0)
{
Stream_Free(s, TRUE);
return FALSE;
}
Stream_Free(s, TRUE);