mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-29 04:50:26 +00:00
kerdat: don't leak a file descriptor
288 if (flock(fd, LOCK_SH)) {
289 pr_perror("Can't take a lock\n");
>>> >>> CID 92726: Resource leaks (RESOURCE_LEAK)
>>> >>> Handle variable "fd" going out of scope leaks the handle.
290 return -1;
291 }
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
8ac865f3ee
commit
59bb688033
1 changed files with 1 additions and 1 deletions
|
|
@ -287,7 +287,7 @@ int kerndat_fdinfo_has_lock()
|
|||
|
||||
if (flock(fd, LOCK_SH)) {
|
||||
pr_perror("Can't take a lock");
|
||||
return -1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
pfd = open_proc(PROC_SELF, "fdinfo/%d", fd);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue