mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
log_init(): don't leak fd on error
Reported by Coverity, CID 51641. Signed-off-by: Kir Kolyshkin <kir@openvz.org> Acked-by: Andrew Vagin <avagin@odin.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
2b8f61393e
commit
08cdae901b
1 changed files with 1 additions and 0 deletions
1
log.c
1
log.c
|
|
@ -89,6 +89,7 @@ int log_init(const char *output)
|
|||
|
||||
if (cr_fchown(new_logfd)) {
|
||||
pr_perror("Can't chown log file %s", output);
|
||||
close(new_logfd);
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue