mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
coverity: fix regresions from 16e9b32c2f
16e9b32c2f
incorrectly moved
free of opened descriptor out of if{} - resulted of
closing random file handle.
This commit is contained in:
parent
6b48233f25
commit
fd37eeddd6
@ -101,10 +101,11 @@ void init_log_file(const char *log_file, int append)
|
||||
append = 1; /* force */
|
||||
}
|
||||
}
|
||||
|
||||
if (st && fclose(st))
|
||||
log_sys_debug("fclose", statfile);
|
||||
}
|
||||
|
||||
if (st && fclose(st))
|
||||
log_sys_debug("fclose", statfile);
|
||||
no_epoch:
|
||||
if (!(_log_file = fopen(log_file, append ? "a" : "w"))) {
|
||||
log_sys_error("fopen", log_file);
|
||||
|
Loading…
Reference in New Issue
Block a user