[sr-dev] git:master:ae95a6a2: ims_usrloc_pcscf: fix warning: this ‘if’ clause does not guard...

Henning Westerholt hw at skalatan.de
Mon Mar 23 11:21:44 CET 2020


Sorry for the wrong author - the author field somehow got corruputed. I will take care to fix it.

-----Original Message-----
From: sr-dev <sr-dev-bounces at lists.kamailio.org> On Behalf Of --list
Sent: Monday, March 23, 2020 11:15 AM
To: sr-dev at lists.kamailio.org
Subject: git:master:ae95a6a2: ims_usrloc_pcscf: fix warning: this ‘if’ clause does not guard...

Module: kamailio
Branch: master
Commit: ae95a6a2f73e6a4153a415c70d9e21562c651c1a
URL: https://github.com/kamailio/kamailio/commit/ae95a6a2f73e6a4153a415c70d9e21562c651c1a

Author: --list <hw at skalatan.de>
Committer: --list <hw at skalatan.de>
Date: 2020-03-23T11:14:38+01:00

ims_usrloc_pcscf: fix warning: this ‘if’ clause does not guard...

---

Modified: src/modules/ims_usrloc_pcscf/pcontact.c

---

Diff:  https://github.com/kamailio/kamailio/commit/ae95a6a2f73e6a4153a415c70d9e21562c651c1a.diff
Patch: https://github.com/kamailio/kamailio/commit/ae95a6a2f73e6a4153a415c70d9e21562c651c1a.patch

---

diff --git a/src/modules/ims_usrloc_pcscf/pcontact.c b/src/modules/ims_usrloc_pcscf/pcontact.c
index 0d156d39c4..1ac55734d7 100644
--- a/src/modules/ims_usrloc_pcscf/pcontact.c
+++ b/src/modules/ims_usrloc_pcscf/pcontact.c
@@ -119,11 +119,12 @@ void free_ppublic(ppublic_t* _p)  // Keep them in sync!
 void free_security(security_t* _p)
 {
-    if (!_p)
+    if (!_p) {
         return;
+    }
 
-	if(_p->sec_header.s)
-		shm_free(_p->sec_header.s);
+    if(_p->sec_header.s)
+        shm_free(_p->sec_header.s);
 
     switch (_p->type)
     {




More information about the sr-dev mailing list