Module: sip-router
Branch: 4.0
Commit: 3438215263f20f63f0e69121113999f952334886
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3438215…
Author: Camille Oudot <camille.oudot(a)orange.com>
Committer: Camille Oudot <camille.oudot(a)orange.com>
Date: Tue Jul 23 11:11:01 2013 +0200
modules/ims_registrar_scscf: safety check in async_cdp_callback
(cherry-picked from commit 1aea13af9b3eea3788e90411bd94cb9e0b0c4ea3)
---
modules/ims_auth/cxdx_mar.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/modules/ims_auth/cxdx_mar.c b/modules/ims_auth/cxdx_mar.c
index 2ec113b..7fea383 100644
--- a/modules/ims_auth/cxdx_mar.c
+++ b/modules/ims_auth/cxdx_mar.c
@@ -425,13 +425,14 @@ done:
shm_free(avlist);
avlist = 0;
}
- struct auth_data_item *tmp1 = adi_list->first;
- while (tmp1) {
- struct auth_data_item *tmp2 = tmp1->next;
- shm_free(tmp1);
- tmp1 = tmp2;
- }
+
if (adi_list) {
+ struct auth_data_item *tmp1 = adi_list->first;
+ while (tmp1) {
+ struct auth_data_item *tmp2 = tmp1->next;
+ shm_free(tmp1);
+ tmp1 = tmp2;
+ }
shm_free(adi_list);
adi_list = 0;
}