Fixed memory leak

There was a major memory leak in pbinversion.cpp file, polar_b(...)
routine, which is fixed now.
Other small changes do not affect functionality.