diff --git a/netwerk/sctp/datachannel/DataChannel.cpp b/netwerk/sctp/datachannel/DataChannel.cpp index 1aa4ae625d5..b1ffc11e153 100644 --- a/netwerk/sctp/datachannel/DataChannel.cpp +++ b/netwerk/sctp/datachannel/DataChannel.cpp @@ -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; } diff --git a/netwerk/sctp/datachannel/DataChannel.h b/netwerk/sctp/datachannel/DataChannel.h index bec2fc7fa91..6b6e3c96722 100644 --- a/netwerk/sctp/datachannel/DataChannel.h +++ b/netwerk/sctp/datachannel/DataChannel.h @@ -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