From 3bb3fa4051c754af1a26f023a902d1ce67fe964e Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Sat, 7 Sep 2019 09:18:38 +0900 Subject: [PATCH] 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. --- eval.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eval.c b/eval.c index 1b62498f36..c588171b0a 100644 --- a/eval.c +++ b/eval.c @@ -950,8 +950,9 @@ rb_rescue2(VALUE (* b_proc) (VALUE), VALUE data1, { 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; } /*!