Fix two potential minor mem leaks