Revert "coverity#736452 Resource leak"

Somehow this one lets the windows tinderboxes fail.

This reverts commit f6012f6c5d40857ea7a9490da90ae5541d859563.

Change-Id: I1f3e503bef74956f64bb2f0b9d748fc7fc7299c5