Minor correctness fix for unnecessary free