mrb: fix a double free bug