Fix wrong type
Remove excess free()