Browse code

app_ruby: memset rbdata to 0 in app_ruby_run_ex()

Daniel-Constantin Mierla authored on 08/01/2020 16:38:57
Showing 1 changed files
... ...
@@ -1130,8 +1130,8 @@ int app_ruby_run_ex(sip_msg_t *msg, char *func, char *p1, char *p2,
1130 1130
 	/* check the script version loaded */
1131 1131
 	app_ruby_kemi_reload_script();
1132 1132
 
1133
+	memset(&rbdata, 0, sizeof(ksr_ruby_data_t));
1133 1134
 	rbdata.robj = rb_mKernel;
1134
-	rbdata.nargs = 0;
1135 1135
 	rbdata.metid = rb_intern(func);
1136 1136
 
1137 1137
 	LM_DBG("executing ruby function: [[%s]]\n", func);