summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-10-30 18:42:38 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-10-30 18:42:38 +0100
commitd0da27ef572152d1fdd82a9ac15bd5c23ad68160 (patch)
treea617d33237e64a1f95a09e40c06a962b586583a1 /media
parent0f7f961e8894c8408b7fa21bbeba7ac503d372eb (diff)
parent50ef259a2df60d020ccb02d76dc5aa4835ee319e (diff)
downloadUXP-d0da27ef572152d1fdd82a9ac15bd5c23ad68160.tar
UXP-d0da27ef572152d1fdd82a9ac15bd5c23ad68160.tar.gz
UXP-d0da27ef572152d1fdd82a9ac15bd5c23ad68160.tar.lz
UXP-d0da27ef572152d1fdd82a9ac15bd5c23ad68160.tar.xz
UXP-d0da27ef572152d1fdd82a9ac15bd5c23ad68160.zip
Merge branch 'release' into Basilisk-releasev2019.10.31
Diffstat (limited to 'media')
-rw-r--r--media/mtransport/third_party/nICEr/src/ice/ice_component.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/media/mtransport/third_party/nICEr/src/ice/ice_component.c b/media/mtransport/third_party/nICEr/src/ice/ice_component.c
index 2be25efca..11b4fcbc1 100644
--- a/media/mtransport/third_party/nICEr/src/ice/ice_component.c
+++ b/media/mtransport/third_party/nICEr/src/ice/ice_component.c
@@ -909,7 +909,6 @@ static int nr_ice_component_process_incoming_check(nr_ice_component *comp, nr_tr
nr_ice_candidate_pair_set_state(pair->pctx,pair,NR_ICE_PAIR_STATE_FROZEN);
if(r=nr_ice_component_insert_pair(comp,pair)) {
*error=(r==R_NO_MEMORY)?500:400;
- nr_ice_candidate_pair_destroy(&pair);
ABORT(r);
}
@@ -1615,6 +1614,7 @@ int nr_ice_component_finalize(nr_ice_component *lcomp, nr_ice_component *rcomp)
int nr_ice_component_insert_pair(nr_ice_component *pcomp, nr_ice_cand_pair *pair)
{
int r,_status;
+ int pair_inserted=0;
/* Pairs for peer reflexive are marked SUCCEEDED immediately */
if (pair->state != NR_ICE_PAIR_STATE_FROZEN &&
@@ -1626,6 +1626,8 @@ int nr_ice_component_insert_pair(nr_ice_component *pcomp, nr_ice_cand_pair *pair
if(r=nr_ice_candidate_pair_insert(&pair->remote->stream->check_list,pair))
ABORT(r);
+ pair_inserted=1;
+
/* Make sure the check timer is running, if the stream was previously
* started. We will not start streams just because a pair was created,
* unless it is the first pair to be created across all streams. */
@@ -1642,6 +1644,9 @@ int nr_ice_component_insert_pair(nr_ice_component *pcomp, nr_ice_cand_pair *pair
_status=0;
abort:
+ if (_status && !pair_inserted) {
+ nr_ice_candidate_pair_destroy(&pair);
+ }
return(_status);
}