fix referece leak in match_init()