This fixes a memory leak introduced by 1ed0c19f
mentioned in commit 7bc3b300
mentioned in commit 852efd71