Module: sip-router
Branch: master
Commit: 2977c559d89ba7e04b9b5a32336baa9789078921
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2977c55…
Author: Jason Penton <jason.penton(a)gmail.com>
Committer: Jason Penton <jason.penton(a)gmail.com>
Date: Thu Jan 30 11:33:51 2014 +0200
modules/ims_usrloc_pcscf: fix segfault when running in DB mode (deleting contact)
---
modules/ims_usrloc_pcscf/udomain.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/modules/ims_usrloc_pcscf/udomain.c b/modules/ims_usrloc_pcscf/udomain.c
index 83975d6..da7af05 100644
--- a/modules/ims_usrloc_pcscf/udomain.c
+++ b/modules/ims_usrloc_pcscf/udomain.c
@@ -551,13 +551,14 @@ int delete_pcontact(udomain_t* _d, str* _aor, struct pcontact* _c)
if (exists_ulcb_type(PCSCF_CONTACT_DELETE)) {
run_ul_callbacks(PCSCF_CONTACT_DELETE, _c);
}
- mem_delete_pcontact(_d, _c);
if (db_mode == WRITE_THROUGH && db_delete_pcontact(_c) != 0) {
LM_ERR("Error deleting contact from DB");
return -1;
}
+ mem_delete_pcontact(_d, _c);
+
return 0;
}