diff --git a/semodule-utils/semodule_package/semodule_package.c b/semodule-utils/semodule_package/semodule_package.c index 3515234e..bc8584b5 100644 --- a/semodule-utils/semodule_package/semodule_package.c +++ b/semodule-utils/semodule_package/semodule_package.c @@ -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; }