The reaction is known as Kolbe electrolysis (Unit 9, Class XI) 1 Halogenation
Carboxylic acids having an a-hydrogen are halogenated at the
a-position on treatment with chlorine or bromine in the presence of
small amount of red phosphorus to give a-halocarboxylic acids The
reaction is known as Hell-Volhard-Zelinsky reaction