[CRIU] [PATCH] posix-timers: don't call ferror for NULL
Andrey Vagin
avagin at openvz.org
Tue Jul 2 08:23:08 EDT 2013
parse_posix_timers should not call ferror if fopen returned NULL.
Reported-by: Adrian Reber <adrian at lisas.de>
Cc: Pavel Tikhomirov <snorcht at gmail.com>
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
proc_parse.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/proc_parse.c b/proc_parse.c
index 7115392..28e2983 100644
--- a/proc_parse.c
+++ b/proc_parse.c
@@ -1190,8 +1190,7 @@ int parse_posix_timers(pid_t pid, struct proc_posix_timers_stat *args)
file = fopen_proc(pid, "timers");
if (file == NULL) {
pr_perror("Can't open posix timers file!");
- ret = -1;
- goto end_posix;
+ return -1;
}
while (1) {
--
1.8.3.1
More information about the CRIU
mailing list