mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cov: reset FILE on error path
Although fclose() fails - we should not be retrying with already released stucture.
This commit is contained in:
parent
59b46fc8cd
commit
7ec7d8cf54
@ -1749,8 +1749,10 @@ int device_ids_write(struct cmd_context *cmd)
|
||||
goto_out;
|
||||
if (fsync(fileno(fp)) < 0)
|
||||
goto_out;
|
||||
if (fclose(fp) < 0)
|
||||
if (fclose(fp) < 0) {
|
||||
fp = NULL;
|
||||
goto_out;
|
||||
}
|
||||
|
||||
fp = NULL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user