Skip to content

Commit 8aa0ba4

Browse files
committed
registrar: Improve error handling
(cherry picked from commit 1875c58)
1 parent c82dcbe commit 8aa0ba4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/reg/lookup.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ lookup_rc lookup(struct sip_msg *req, udomain_t *d,
5656
int idx = 0, nbranches = 0, tlen;
5757
char *turi;
5858
qvalue_t tq;
59-
urecord_t* r;
59+
urecord_t* r = NULL;
6060
str aor;
6161
ucontact_t *ct, **ptr, **pn_cts, **cts;
6262
int max_latency = 0, ruri_is_pushed = 0;
@@ -197,6 +197,7 @@ lookup_rc lookup(struct sip_msg *req, udomain_t *d,
197197
/* relsease old aor lock */
198198
ul.release_urecord(r, 0);
199199
ul.unlock_udomain(d, &aor);
200+
r = NULL;
200201

201202
next_aor:
202203
aor_uri = &branch_uris[idx];

0 commit comments

Comments
 (0)