Singular behaviour of the free energy in the sol-gel transition