3c55d0c69b
If writing the recording header fails, do not clean the resources immediately to avoid double-free.
If writing the recording header fails, do not clean the resources immediately to avoid double-free.