Added missing call to free()