File: commit-74c2694

package info (click to toggle)
kmod 18-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 13,092 kB
  • ctags: 1,586
  • sloc: ansic: 13,387; xml: 1,848; makefile: 430; sh: 209; python: 7
file content (19 lines) | stat: -rw-r--r-- 629 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
commit 74c26943f1228870022d116a1fda25be3a55a38e
Author: Cristian Rodríguez <crrodriguez@opensuse.org>
Date:   Wed Jun 18 20:51:00 2014 -0400

    Add missing O_CLOEXEC in kmod_module_get_size()

diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c
index e3cc5a7..b81b451 100644
--- a/libkmod/libkmod-module.c
+++ b/libkmod/libkmod-module.c
@@ -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;