Commit f70859e2 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

posix-timers: don't call ferror for NULL

parse_posix_timers should not call ferror if fopen returned NULL.
Reported-by: 's avatarAdrian Reber <adrian@lisas.de>
Cc: Pavel Tikhomirov <snorcht@gmail.com>
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent c8f3e09f
...@@ -1190,8 +1190,7 @@ int parse_posix_timers(pid_t pid, struct proc_posix_timers_stat *args) ...@@ -1190,8 +1190,7 @@ int parse_posix_timers(pid_t pid, struct proc_posix_timers_stat *args)
file = fopen_proc(pid, "timers"); file = fopen_proc(pid, "timers");
if (file == NULL) { if (file == NULL) {
pr_perror("Can't open posix timers file!"); pr_perror("Can't open posix timers file!");
ret = -1; return -1;
goto end_posix;
} }
while (1) { while (1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment