1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

include/ruby/backward/cxxanyargs.hpp: call va_end before return

Coverity Scan complains it.
This commit is contained in:
Yusuke Endoh 2019-10-24 08:30:33 +09:00
parent f26f0f4109
commit 281f754126

View file

@ -227,8 +227,9 @@ rb_rescue2(type *q, VALUE w, type *e, VALUE r, ...)
func2_t *y = reinterpret_cast<func2_t*>(e);
va_list ap;
va_start(ap, r);
return ::rb_vrescue2(t, w, y, r, ap);
VALUE ret = ::rb_vrescue2(t, w, y, r, ap);
va_end(ap);
return ret;
}
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprected")