Skip to content

Commit

Permalink
dmq: safety check for peer_list when calling the callbacks
Browse files Browse the repository at this point in the history
- can result in crashing if it is not set
- reported by Olle E. Johansson
  • Loading branch information
miconda committed Jan 8, 2015
1 parent af9fba8 commit cc5f96f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/dmq/notification_peer.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ int extract_node_list(dmq_node_list_t* update_list, struct sip_msg* msg)
int run_init_callbacks() {
dmq_peer_t* crt;

if(peer_list==0) {
LM_WARN("peer list is null\n");
return 0;
}
crt = peer_list->peers;
while(crt) {
if (crt->init_callback) {
Expand Down

0 comments on commit cc5f96f

Please sign in to comment.