That is not a violation of freedom of speech. Lies are not covered by freedom of speech in Germany, they're not covered by freedom of speech in other countries either, even the US. In fact in most countries certain types of lies are illegal and fall under laws against fraud, libel or any number of things. Germany simply also covers incitement of hatred.
Additionally the first article of the German constitution and one of its fundamental principles is that human dignity shall be inviolable and that the state has a duty to respect and protect it. In my opinion ensuring the dignity of the vicitims of the holocaust is protected requires making sure that the state fights those that would deny the holocaust.