Fix #928.  Fix memory leak, mea culpa.