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.
This commit is contained in:
Yusuke Endoh 2019-09-07 09:18:38 +09:00
parent 9c0626fa90
commit 3bb3fa4051

3
eval.c
View File

@ -950,8 +950,9 @@ rb_rescue2(VALUE (* b_proc) (VALUE), VALUE data1,
{ {
va_list ap; va_list ap;
va_start(ap, data2); 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); va_end(ap);
return ret;
} }
/*! /*!