mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
amdgpu: don't leak fd on an error path in open_img_file
Signed-off-by: Andrei Vagin <avagin@gmail.com>
This commit is contained in:
parent
a68975c06d
commit
940a05c0ba
1 changed files with 1 additions and 0 deletions
|
|
@ -165,6 +165,7 @@ FILE *open_img_file(char *path, bool write, size_t *size)
|
|||
fp = fdopen(fd, write ? "w" : "r");
|
||||
if (!fp) {
|
||||
pr_perror("%s: Failed get pointer for %s", path, write ? "write" : "read");
|
||||
close(fd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue