Skip to content

Commit

Permalink
route: do not unref if route not initialized
Browse files Browse the repository at this point in the history
Prevents crash when init fails and routes have not yet been initialized
  • Loading branch information
razvancrainea committed Aug 31, 2023
1 parent 9996f9f commit f07048c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions route.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,9 @@ void unref_script_route(struct script_route_ref *ref)
{
struct script_route_ref *it;

if (!ref)
return;

//LM_DBG("xXx--- unrefing %p [%.*s] with idx %d, ver/cnt\n", ref,
// ref->name.len, ref->name.s, ref->idx, ref->u.version);

Expand Down

0 comments on commit f07048c

Please sign in to comment.