Module: kamailio
Branch: master
Commit: ce3cd42631ac06a6a20892bd308901c6acd58f7a
URL:
https://github.com/kamailio/kamailio/commit/ce3cd42631ac06a6a20892bd308901c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-23T13:33:03+02:00
dialog: init output dlg var value param eariler
---
Modified: src/modules/dialog/dlg_var.c
---
Diff:
https://github.com/kamailio/kamailio/commit/ce3cd42631ac06a6a20892bd308901c…
Patch:
https://github.com/kamailio/kamailio/commit/ce3cd42631ac06a6a20892bd308901c…
---
diff --git a/src/modules/dialog/dlg_var.c b/src/modules/dialog/dlg_var.c
index 4db8d84c35..04a645309b 100644
--- a/src/modules/dialog/dlg_var.c
+++ b/src/modules/dialog/dlg_var.c
@@ -310,14 +310,14 @@ int get_dlg_varval(struct dlg_cell *dlg, str *key, str *val)
{
str *var = NULL;
+ val->s = NULL;
+ val->len = 0;
+
if( !dlg || !key || key->len > strlen(key->s)) {
LM_ERR("BUG - bad parameters\n");
return -1;
}
- val->s = NULL;
- val->len = 0;
-
dlg_lock(d_table, &(d_table->entries[dlg->h_entry]));
var = get_dlg_variable_unsafe(dlg, key);
if(var) {