Should prevent some leaks if header writing fails Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>