Bug 942940 - Fix a potential memory leak. r=abr
authorByron Campen [:bwc] <docfaraday@gmail.com>
Tue, 03 Dec 2013 16:11:29 -0800
changeset 173884 5544b1b9b81e15599b4027054420c03be8b632f3
parent 173883 22b9018bf95c103be522c20a7bcbdfd8c0bfa13b
child 173885 0d405a9b2a8a252e620d2a5b4e53e1fdaa743b14
push id3224
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:06:49 +0000
treeherdermozilla-beta@60c04d0987f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersabr
bugs942940
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 942940 - Fix a potential memory leak. r=abr
media/mtransport/third_party/nICEr/src/ice/ice_component.c
--- a/media/mtransport/third_party/nICEr/src/ice/ice_component.c
+++ b/media/mtransport/third_party/nICEr/src/ice/ice_component.c
@@ -525,16 +525,17 @@ static int nr_ice_component_process_inco
              &pair)) {
           *error=(r==R_NO_MEMORY)?500:400;
           ABORT(r);
         }
         nr_ice_candidate_pair_set_state(pair->pctx,pair,NR_ICE_PAIR_STATE_FROZEN);
 
         if(r=nr_ice_candidate_pair_insert(&comp->stream->check_list,pair)) {
           *error=(r==R_NO_MEMORY)?500:400;
+          nr_ice_candidate_pair_destroy(&pair);
           ABORT(r);
         }
 
         /* Do this last, since any call to ABORT will destroy pcand */
         TAILQ_INSERT_TAIL(&comp->candidates,pcand,entry_comp);
         pcand=0;
       }
       else{