From: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Sat, 21 May 2022 08:21:49 +0200
Subject: [PATCH] dialog: fix ki_dlg_get_var() introduced previously

---
 src/modules/dialog/dialog.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/modules/dialog/dialog.c b/src/modules/dialog/dialog.c
index 623db59..628dc4d 100644
--- a/src/modules/dialog/dialog.c
+++ b/src/modules/dialog/dialog.c
@@ -1552,14 +1552,14 @@ static sr_kemi_xval_t *ki_dlg_get_var(sip_msg_t *msg, str *sc, str *sf, str *st,
 
 	memset(&_sr_kemi_dialog_xval, 0, sizeof(sr_kemi_xval_t));
 
-	val = ki_dlg_get_var_helper(msg, &sc, &sf, &st, &k);
+	val = ki_dlg_get_var_helper(msg, sc, sf, st, key);
 	if(!val) {
 		sr_kemi_xval_null(&_sr_kemi_dialog_xval, SR_KEMI_XVAL_NULL_NONE);
 		return &_sr_kemi_dialog_xval;
 	}
 
 	_sr_kemi_dialog_xval.vtype = SR_KEMIP_STR;
-	_sr_kemi_dialog_xval.v.s = *pval;
+	_sr_kemi_dialog_xval.v.s = *val;
 
 	return &_sr_kemi_dialog_xval;
 
