semodule_package: Close leaking fd

Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
This commit is contained in:
Petr Lautrbach 2022-04-01 15:35:48 +02:00
parent 28510556f8
commit ac16531b5a

View File

@ -73,6 +73,7 @@ static int file_to_data(const char *path, char **data, size_t * len)
goto err; goto err;
} }
if (!sb.st_size) { if (!sb.st_size) {
close(fd);
*len = 0; *len = 0;
return 0; return 0;
} }