Skip to content

Commit

Permalink
ims_usrloc_scscf:bugfix erraneous unlinking of deleted contact
Browse files Browse the repository at this point in the history
impurecord.c: corrected small bug in remove_impucontact_from_list()
  • Loading branch information
frie authored and Christoph Valentin committed Jun 20, 2018
1 parent 2f63caf commit 4e90aea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/ims_usrloc_scscf/impurecord.c
Expand Up @@ -1102,10 +1102,11 @@ int remove_impucontact_from_list(impurecord_t* impu, impu_contact_t *impucontact
} else if (contact == impu->linked_contacts.tail->contact) {
LM_DBG("deleting tail\n");
impu->linked_contacts.tail = impu->linked_contacts.tail->prev;
impu->linked_contacts.tail->next = 0;
} else {
LM_DBG("deleting mid list\n");
impucontact->prev->next = impucontact->next;
impucontact->prev = impucontact->next->prev;
impucontact->next->prev = impucontact->prev;
}

impu->linked_contacts.numcontacts--;
Expand Down

0 comments on commit 4e90aea

Please sign in to comment.