Skip to content

Commit

Permalink
clusterer: fix crashes when loading bad local node URL from DB
Browse files Browse the repository at this point in the history
  • Loading branch information
rvlad-patrascu authored and tommybrecher committed Sep 18, 2024
1 parent 4a2a0a9 commit 2f6f349
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions modules/clusterer/node_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,10 +476,14 @@ int load_db_info(db_func_t *dr_dbf, db_con_t* db_hdl, str *db_table,
/* add info to backing list */
if ((rc = add_node_info(&_, cl_list, int_vals, str_vals)) != 0) {
LM_ERR("Unable to add node info to backing list\n");
if (rc < 0)
if (rc < 0) {
return -1;
else
} else if (int_vals[INT_VALS_NODE_ID_COL] == current_id) {
LM_ERR("Invalid info for local node\n");
return -1;
} else {
return 2;
}
}
}

Expand Down

0 comments on commit 2f6f349

Please sign in to comment.