]> git.ipfire.org Git - thirdparty/glibc.git/commit
support: Also return fd when it is 0
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Wed, 6 Oct 2021 16:18:35 +0000 (21:48 +0530)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Wed, 6 Oct 2021 16:56:05 +0000 (22:26 +0530)
commit558168c78ea1eb8efb33959c1da9d6b5a997fd7b
tree6ae3b67399f5c9575db818183cbe172d6506db7b
parenta996d13b8a2e101bedbb1bdaa7ffcfea3b959bb2
support: Also return fd when it is 0

The fd validity check in open_dev_null checks if fd > 0, which would
lead to a leaked fd if it is == 0.

Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
(cherry picked from commit 27b6edbb090f736b101f569620d8ad0e7217ddf8)
support/support-open-dev-null-range.c