Bug 1008786: Zero outparams in nr_reg_fetch_node before we do anything that might abort. r=drno
authorByron Campen [:bwc] <docfaraday@gmail.com>
Tue, 10 Jun 2014 11:05:25 -0700
changeset 224141 78518d0a8e8201ed2ce79f8b0fa28a4e36faf230
parent 224140 4fc87f021e00469802b45cb94a6852dbac6af94f
child 224142 c7eccf7c09f1e392bac95fbd36a66228937eaea8
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdrno
bugs1008786
milestone34.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 1008786: Zero outparams in nr_reg_fetch_node before we do anything that might abort. r=drno
media/mtransport/third_party/nrappkit/src/registry/registry_local.c
--- a/media/mtransport/third_party/nrappkit/src/registry/registry_local.c
+++ b/media/mtransport/third_party/nrappkit/src/registry/registry_local.c
@@ -330,22 +330,22 @@ nr_reg_rfree(void *ptr)
     return 0;
 }
 
 int
 nr_reg_fetch_node(char *name, unsigned char type, nr_registry_node **node, int *free_node)
 {
     int r, _status;
 
+    *node = 0;
+    *free_node = 0;
+
     if ((r=nr_reg_is_valid(name)))
       ABORT(r);
 
-    *node = 0;
-    *free_node = 0;
-
     if ((r=r_assoc_fetch(nr_registry, name, strlen(name)+1, (void*)node)))
       ABORT(r);
 
     if ((*node)->type != type)
       ABORT(R_FAILED);
 
     _status=0;
   abort: