Fix minor unit test memory leaks

Result:
```
==1519== LEAK SUMMARY:
==1519==    definitely lost: 0 bytes in 0 blocks
==1519==    indirectly lost: 0 bytes in 0 blocks
==1519==      possibly lost: 0 bytes in 0 blocks
==1519==    still reachable: 2,360 bytes in 14 blocks
==1519==         suppressed: 0 bytes in 0 blocks
```