mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +03:00
coverity: fix regresions from 16e9b32c2f1
16e9b32c2f1a2d7e0f05a88981824ef0e7607965 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…
x
Reference in New Issue
Block a user