fixed some memory leaks in osd (nw)