ruby-changes:57621
From: Yusuke <ko1@a...>
Date: Sat, 7 Sep 2019 09:20:44 +0900 (JST)
Subject: [ruby-changes:57621] 3bb3fa4051 (master): eval.c (rb_rescue2): fix a probably wrong return
https://git.ruby-lang.org/ruby.git/commit/?id=3bb3fa4051 From 3bb3fa4051c754af1a26f023a902d1ce67fe964e Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Sat, 7 Sep 2019 09:18:38 +0900 Subject: eval.c (rb_rescue2): fix a probably wrong return This return skips `va_end(ap)`, which is not intended, I guess. Coverity Scan found this. diff --git a/eval.c b/eval.c index 1b62498..c588171 100644 --- a/eval.c +++ b/eval.c @@ -950,8 +950,9 @@ rb_rescue2(VALUE (* b_proc) (VALUE), VALUE data1, https://github.com/ruby/ruby/blob/trunk/eval.c#L950 { va_list ap; va_start(ap, data2); - return rb_vrescue2(b_proc, data1, r_proc, data2, ap); + VALUE ret = rb_vrescue2(b_proc, data1, r_proc, data2, ap); va_end(ap); + return ret; } /*! -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/