In this respect, the freedom of the press is certainly for the state machine what the safety-valve is for the steam-engine. For by means of it, every dissatisfaction is at once ventilated in words and such grievance is soon exhausted if in it there is not very much substance. If, however, there is, then such ventilation is a good thing and enables the matter to be known in time and to be put right. This is very much better than forcing down the grievance so that it simmers, ferments, expands, and finally ends in an explosion.

[In dieser Hinsicht ist allerdings für die Staatsmaschine die Preßfreiheit Das, was für die Dampfmaschine die Sicherheitsvalve: denn mittelst derselben macht jede Unzufriedenheit sich alsbald durch Worte Luft, ja wird sich, wenn sie nicht sehr viel Stoff. hat, an ihnen erschöpfen. Hat sie jedoch diesen, so ist es gut, daß man ihn bei Zeiten erkenne, um abzuhelfen sehr viel besser, als wenn die Unzufriedenheit eingezwängt bleibt, brütet, gährt, kocht und anwächst, bis sie endlich zur Explosion gelangt.]

Arthur Schopenhauer
Arthur Schopenhauer (1788-1860) German philosopher
Parerga and Paralipomena, Vol. 2, ch. 9 “On Jurisprudence and Politics [Zur Rechtslehre und Politik],” § 127 (1851) [tr. Payne (1974)]
    (Source)

(Source (German)). Alternate translation:

Freedom of the press is to the machinery of the state what the safety-valve is to the steam engine: every discontent is by means of it immediately relieved in words -- indeed, unless this discontent is very considerable, it exhausts itself in this way. If, however, it is very considerable, it is as well to know of it in time, so as to redress it.
[tr. Hollingdale (1970)]