fix a memleak in cqm