Skip to content

Commit

Permalink
semodule_package: Close leaking fd
Browse files Browse the repository at this point in the history
Signed-off-by: Petr Lautrbach <[email protected]>
  • Loading branch information
bachradsusi committed Apr 6, 2022
1 parent 2851055 commit ac16531
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions semodule-utils/semodule_package/semodule_package.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ static int file_to_data(const char *path, char **data, size_t * len)
goto err;
}
if (!sb.st_size) {
close(fd);
*len = 0;
return 0;
}
Expand Down

0 comments on commit ac16531

Please sign in to comment.