Module: kamailio Branch: master Commit: f95ede239474f8c3b901f83e7eb34cbfa8f0e0fd URL: https://github.com/kamailio/kamailio/commit/f95ede239474f8c3b901f83e7eb34cbf...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2021-04-02T10:04:10+02:00
dmq: access val after being tested for null
---
Modified: src/modules/dmq/dmq.c
---
Diff: https://github.com/kamailio/kamailio/commit/f95ede239474f8c3b901f83e7eb34cbf... Patch: https://github.com/kamailio/kamailio/commit/f95ede239474f8c3b901f83e7eb34cbf...
---
diff --git a/src/modules/dmq/dmq.c b/src/modules/dmq/dmq.c index 7d343b193b..79cc8ccbc9 100644 --- a/src/modules/dmq/dmq.c +++ b/src/modules/dmq/dmq.c @@ -365,14 +365,14 @@ static void destroy(void) static int dmq_add_notification_address(modparam_t type, void * val) { str tmp_str; - tmp_str.s = ((str*) val)->s; - tmp_str.len = ((str*) val)->len; int total_list = 0; /* not used */
if(val==NULL) { LM_ERR("invalid notification address parameter value\n"); return -1; } + tmp_str.s = ((str*) val)->s; + tmp_str.len = ((str*) val)->len; if(parse_uri(tmp_str.s, tmp_str.len, &dmq_notification_uri) < 0) { LM_ERR("could not parse notification address\n"); return -1;