Add missing O_CLOEXEC in kmod_module_get_size()

This commit is contained in:
Cristian Rodríguez 2014-06-18 20:51:00 -04:00 committed by Lucas De Marchi
parent ae58de0fcb
commit 74c26943f1

View File

@ -1783,7 +1783,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;