Genovese made a major error by putting Valachi's back to the wall. Instead of "keeping his enemies closer",Vito's ego demanded that he let Valachi spend his days in fear,waiting for the axe to fall,never knowing when or how the end would come.
Had Vito taken Valachi into his inner circle in prison,and treated him as a friend,he could have taken him out easily.
Instead,this nitwit gives Valachi a literal "kiss of death" in public.
Knowing that he was done for and desperate to survive,Valachi kills an innocent man,and puts the wheels in motion for his flipping.