fixing memory leaks

Change-Id: I959e913407a7ebae9ab3196d678cc482e8b84ba3
changes/94/21294/1
Jerzy Ptak 8 years ago committed by Richard Fuchs
parent 1c5d2d3f2f
commit 167ecf80c2

@ -752,6 +752,13 @@ void dtls_shutdown(struct packet_stream *ps) {
__DBG("dtls_shutdown");
if (ps->ice_dtls.init) {
if (ps->ice_dtls.connected && ps->ice_dtls.ssl) {
SSL_shutdown(ps->ice_dtls.ssl);
}
dtls_connection_cleanup(&ps->ice_dtls);
}
for (GList *l = ps->sfds.head; l; l = l->next) {
struct stream_fd *sfd = l->data;

@ -270,6 +270,7 @@ found:;
if (rtt <= 0 || rtt > 10000000) {
ilog(LOG_DEBUG, "Invalid RTT - discarding");
obj_put(&e->h);
return 0;
}
@ -318,17 +319,14 @@ void ssrc_receiver_report(struct call_media *m, const struct ssrc_receiver_repor
// determine the clock rate for jitter values
if (pt < 0) {
pt = other_e->payload_type;
if (pt < 0) {
ilog(LOG_DEBUG, "No payload type known for RTCP RR, discarding");
goto out_nl;
}
ilog(LOG_DEBUG, "No payload type known for RTCP RR, discarding");
goto out_nl_put;
}
const struct rtp_payload_type *rpt = rtp_payload_type(pt, m->codecs);
if (!rpt) {
ilog(LOG_INFO, "Invalid RTP payload type %i, discarding RTCP RR", pt);
goto out_nl;
goto out_nl_put;
}
unsigned int jitter = rpt->clock_rate ? (rr->jitter * 1000 / rpt->clock_rate) : rr->jitter;
ilog(LOG_DEBUG, "Calculated jitter for %u is %u ms", rr->ssrc, jitter);
@ -375,6 +373,8 @@ void ssrc_receiver_report(struct call_media *m, const struct ssrc_receiver_repor
out_ul_oe:
mutex_unlock(&other_e->h.lock);
goto out_nl_put;
out_nl_put:
obj_put(&other_e->h);
goto out_nl;
out_nl:

Loading…
Cancel
Save