Bug 1008786: Zero outparams in nr_reg_fetch_node before we do anything that might abort. r=drno

This commit is contained in:
Byron Campen [:bwc] 2014-06-10 11:05:25 -07:00
parent 586de84792
commit 47cec2edf5

View File

@ -335,12 +335,12 @@ nr_reg_fetch_node(char *name, unsigned char type, nr_registry_node **node, int *
{ {
int r, _status; int r, _status;
if ((r=nr_reg_is_valid(name)))
ABORT(r);
*node = 0; *node = 0;
*free_node = 0; *free_node = 0;
if ((r=nr_reg_is_valid(name)))
ABORT(r);
if ((r=r_assoc_fetch(nr_registry, name, strlen(name)+1, (void*)node))) if ((r=r_assoc_fetch(nr_registry, name, strlen(name)+1, (void*)node)))
ABORT(r); ABORT(r);