Court finds parts of anti-riot law violate free speech