[sr-dev] git:master: modules/ims_registrar_scscf: safety check in async_cdp_callback

Camille Oudot camille.oudot at orange.com
Thu Jul 25 16:37:56 CEST 2013


Module: sip-router
Branch: master
Commit: 1aea13af9b3eea3788e90411bd94cb9e0b0c4ea3
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1aea13af9b3eea3788e90411bd94cb9e0b0c4ea3

Author: Camille Oudot <camille.oudot at orange.com>
Committer: Camille Oudot <camille.oudot at orange.com>
Date:   Tue Jul 23 11:11:01 2013 +0200

modules/ims_registrar_scscf: safety check in async_cdp_callback

---

 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 4fa7e17..f48927b 100644
--- a/modules/ims_auth/cxdx_mar.c
+++ b/modules/ims_auth/cxdx_mar.c
@@ -426,13 +426,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;
     }




More information about the sr-dev mailing list