record: fixed file handle not free

Signed-off-by: yanlonglong <yanlonglong@kylinos.cn>
Acked-by: Frediano Ziglio <freddy77@gmail.com>
This commit is contained in:
yanlonglong 2026-03-26 09:33:16 +08:00 committed by Frediano Ziglio
parent a904cd8643
commit d8501d984d

View File

@ -874,6 +874,7 @@ RedRecord *red_record_new(const char *filename)
}
if (fwrite(header, sizeof(header)-1, 1, f) != 1) {
fclose(f);
spice_error("failed to write replay header");
}