* Fixes NB#92091, fixes a memory leak, two reference leaks and a typo