Module: kamailio
Branch: 5.3
Commit: c26f248ba5be9f56bc1c58ad531fc5ead060a2e2
URL:
https://github.com/kamailio/kamailio/commit/c26f248ba5be9f56bc1c58ad531fc5e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-05-01T09:52:35+02:00
ims_usrloc_pcscf: fix value array size and compile warnings
(cherry picked from commit 1292e40c5260fa77d34db91abf7aacf47549d5e2)
---
Modified: src/modules/ims_usrloc_pcscf/pcontact.c
Modified: src/modules/ims_usrloc_pcscf/usrloc_db.c
---
Diff:
https://github.com/kamailio/kamailio/commit/c26f248ba5be9f56bc1c58ad531fc5e…
Patch:
https://github.com/kamailio/kamailio/commit/c26f248ba5be9f56bc1c58ad531fc5e…
---
diff --git a/src/modules/ims_usrloc_pcscf/pcontact.c
b/src/modules/ims_usrloc_pcscf/pcontact.c
index 1ac55734d7..e597a0daf4 100644
--- a/src/modules/ims_usrloc_pcscf/pcontact.c
+++ b/src/modules/ims_usrloc_pcscf/pcontact.c
@@ -123,8 +123,9 @@ void free_security(security_t* _p)
return;
}
- if(_p->sec_header.s)
+ if(_p->sec_header.s) {
shm_free(_p->sec_header.s);
+ }
switch (_p->type)
{
@@ -144,8 +145,9 @@ void free_security(security_t* _p)
break;
case SECURITY_TLS:
- if(_p->data.tls)
+ if(_p->data.tls) {
shm_free(_p->data.tls);
+ }
break;
case SECURITY_NONE:
diff --git a/src/modules/ims_usrloc_pcscf/usrloc_db.c
b/src/modules/ims_usrloc_pcscf/usrloc_db.c
index ba71673e44..ca57a2b4b3 100644
--- a/src/modules/ims_usrloc_pcscf/usrloc_db.c
+++ b/src/modules/ims_usrloc_pcscf/usrloc_db.c
@@ -213,7 +213,7 @@ int db_update_pcontact(pcontact_t* _c)
int db_delete_pcontact(pcontact_t* _c)
{
LM_DBG("Trying to delete contact: aor[%.*s], received port %u\n",
_c->aor.len, _c->aor.s, _c->received_port);
- db_val_t values[1];
+ db_val_t values[2];
db_key_t match_keys[2] = { &aor_col, &received_port_col };
VAL_TYPE(values) = DB1_STR;