semodule_package: Close leaking fd
Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
This commit is contained in:
parent
28510556f8
commit
ac16531b5a
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue