Browse code

dialog: init output dlg var value param eariler

Daniel-Constantin Mierla authored on 23/09/2022 11:33:03
Showing 1 changed files
... ...
@@ -310,14 +310,14 @@ int get_dlg_varval(struct dlg_cell *dlg, str *key, str *val)
310 310
 {
311 311
 	str *var = NULL;
312 312
 
313
+	val->s = NULL;
314
+	val->len = 0;
315
+
313 316
 	if( !dlg || !key || key->len > strlen(key->s)) {
314 317
 		LM_ERR("BUG - bad parameters\n");
315 318
 		return -1;
316 319
 	}
317 320
 
318
-	val->s = NULL;
319
-	val->len = 0;
320
-
321 321
 	dlg_lock(d_table, &(d_table->entries[dlg->h_entry]));
322 322
 	var = get_dlg_variable_unsafe(dlg, key);
323 323
 	if(var) {