Module: kamailio
Branch: master
Commit: 1292e40c5260fa77d34db91abf7aacf47549d5e2
URL:
https://github.com/kamailio/kamailio/commit/1292e40c5260fa77d34db91abf7aacf…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-04-23T10:21:22+02:00
ims_usrloc_pcscf: fix value array size and compile warnings
---
Modified: src/modules/ims_usrloc_pcscf/pcontact.c
Modified: src/modules/ims_usrloc_pcscf/usrloc_db.c
---
Diff:
https://github.com/kamailio/kamailio/commit/1292e40c5260fa77d34db91abf7aacf…
Patch:
https://github.com/kamailio/kamailio/commit/1292e40c5260fa77d34db91abf7aacf…
---
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;