r527: More memory leak fixes in error paths from kawasa_r@itg.hitachi.co.jp.