summaryrefslogtreecommitdiff
path: root/include/ruby/backward/cxxanyargs.hpp
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-10-24 08:30:33 +0900
committerYusuke Endoh <mame@ruby-lang.org>2019-10-24 08:30:33 +0900
commit281f754126a9edf003e347f28ab20e154e22464d (patch)
treeecae7942beb57038a5b67b02f1a927822302b5cf /include/ruby/backward/cxxanyargs.hpp
parentf26f0f41096c026e4874bf1af8d500a7aaa69e59 (diff)
include/ruby/backward/cxxanyargs.hpp: call `va_end` before return
Coverity Scan complains it.
Diffstat (limited to 'include/ruby/backward/cxxanyargs.hpp')
-rw-r--r--include/ruby/backward/cxxanyargs.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/ruby/backward/cxxanyargs.hpp b/include/ruby/backward/cxxanyargs.hpp
index 55b841b24e..a2e63f2943 100644
--- a/include/ruby/backward/cxxanyargs.hpp
+++ b/include/ruby/backward/cxxanyargs.hpp
@@ -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")