]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
Add missing O_CLOEXEC in kmod_module_get_size()
authorCristian Rodríguez <crrodriguez@opensuse.org>
Thu, 19 Jun 2014 00:51:00 +0000 (20:51 -0400)
committerLucas De Marchi <lucas.demarchi@intel.com>
Thu, 19 Jun 2014 21:01:37 +0000 (18:01 -0300)
libkmod/libkmod-module.c

index e3cc5a76d1fd85497625c80204e4e0b74a6ac0e3..b81b451609b14f9dfc41c5ee2988b2d9960f2517 100644 (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;