* [LTP] [PATCH] proc01: Close the opened file
@ 2021-04-29 7:03 zhanglianjie
2021-04-30 11:21 ` Cyril Hrubis
0 siblings, 1 reply; 2+ messages in thread
From: zhanglianjie @ 2021-04-29 7:03 UTC (permalink / raw)
To: ltp
Signed-off-by: zhanglianjie <zhanglianjie@uniontech.com>
---
testcases/kernel/fs/proc/proc01.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/testcases/kernel/fs/proc/proc01.c b/testcases/kernel/fs/proc/proc01.c
index 96441d153..0fae6754f 100644
--- a/testcases/kernel/fs/proc/proc01.c
+++ b/testcases/kernel/fs/proc/proc01.c
@@ -368,6 +368,7 @@ static long readproc(const char *obj)
if ((statbuf.st_mode & S_IRUSR) == 0 &&
(statbuf.st_mode & S_IWUSR) != 0) {
tst_resm(TINFO, "%s: is write-only.", obj);
+ (void)close(fd);
return 0;
}
@@ -376,6 +377,7 @@ static long readproc(const char *obj)
if (!strcmp(obj, error_nonblock[i])) {
tst_resm(TINFO, "%s: does not honor "
"O_NONBLOCK", obj);
+ (void)close(fd);
return 0;
}
}
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [LTP] [PATCH] proc01: Close the opened file
2021-04-29 7:03 [LTP] [PATCH] proc01: Close the opened file zhanglianjie
@ 2021-04-30 11:21 ` Cyril Hrubis
0 siblings, 0 replies; 2+ messages in thread
From: Cyril Hrubis @ 2021-04-30 11:21 UTC (permalink / raw)
To: ltp
Hi!
Applied, thanks.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-30 11:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-29 7:03 [LTP] [PATCH] proc01: Close the opened file zhanglianjie
2021-04-30 11:21 ` Cyril Hrubis
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.