Bug 1017835: use array delete for SCTP/DTLS SendPacket data r=jib DONTBUILD

This commit is contained in:
Randell Jesup 2014-06-28 04:26:34 -04:00
parent d1f11de061
commit 7825a71046
2 changed files with 3 additions and 3 deletions

View File

@ -680,12 +680,12 @@ DataChannelConnection::SctpDtlsInput(TransportFlow *flow,
}
int
DataChannelConnection::SendPacket(const unsigned char *data, size_t len, bool release)
DataChannelConnection::SendPacket(unsigned char data[], size_t len, bool release)
{
//LOG(("%p: SCTP/DTLS sent %ld bytes", this, len));
int res = mTransportFlow->SendPacket(data, len) < 0 ? 1 : 0;
if (release)
delete data;
delete [] data;
return res;
}

View File

@ -200,7 +200,7 @@ private:
#ifdef SCTP_DTLS_SUPPORTED
static void DTLSConnectThread(void *data);
int SendPacket(const unsigned char* data, size_t len, bool release);
int SendPacket(unsigned char data[], size_t len, bool release);
void SctpDtlsInput(TransportFlow *flow, const unsigned char *data, size_t len);
static int SctpDtlsOutput(void *addr, void *buffer, size_t length, uint8_t tos, uint8_t set_df);
#endif