diff --git a/toxav/rtp.c b/toxav/rtp.c index 42c9480c..b52840c1 100755 --- a/toxav/rtp.c +++ b/toxav/rtp.c @@ -752,6 +752,7 @@ int rtp_send_msg ( RTPSession *session, Messenger *messenger, const uint8_t *dat /*if ( full_length != sendpacket ( messenger->net, *((IP_Port*) &session->dest), _send_data, full_length) ) {*/ if ( full_length != send_custom_user_packet(messenger, session->dest, _send_data, full_length) ) { /*fprintf(stderr, "Rtp error: %s\n", strerror(errno));*/ + rtp_free_msg ( session, msg ); return -1; }