summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-09-07 09:18:38 +0900
committerYusuke Endoh <mame@ruby-lang.org>2019-09-07 09:20:27 +0900
commit3bb3fa4051c754af1a26f023a902d1ce67fe964e (patch)
tree8d6e3183f0ff89c24a2def33fe40a1fcb11b8922 /eval.c
parent9c0626fa909b57e43a476aa78171e140ae09d31f (diff)
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.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c3
1 files changed, 2 insertions, 1 deletions
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,
{
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;
}
/*!