Fix unchecked malloc calls and casts of malloc return values

In the long term the exit calls should be replaced by returns.
until then this is the correct way to handle failures.

the casts are not needed (in C) and we don't cast malloc return values anywhere else.

Corresponding to flashrom svn r1370.

Signed-off-by: Stefan Tauner <>
Acked-by: Uwe Hermann <>
4 files changed