Signed-off-by: Cristian Rodríguez <crrodriguez@xxxxxxxxxxxx> --- libkmod/libkmod-module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c index b1d40b1..dac8eef 100644 --- a/libkmod/libkmod-module.c +++ b/libkmod/libkmod-module.c @@ -1713,7 +1713,7 @@ KMOD_EXPORT long kmod_module_get_size(const struct kmod_module *mod) * loaded. */ snprintf(line, sizeof(line), "/sys/module/%s", mod->name); - dfd = open(line, O_RDONLY); + dfd = open(line, O_RDONLY|O_CLOEXEC); if (dfd < 0) return -errno; -- 1.8.1.1 -- To unsubscribe from this list: send the line "unsubscribe linux-modules" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html