summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/shared/util.c b/src/shared/util.c
index 260c100868..03d6f00622 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -219,6 +219,8 @@ void close_nointr_nofail(int fd) {
void close_many(const int fds[], unsigned n_fd) {
unsigned i;
+ assert(fds || n_fd <= 0);
+
for (i = 0; i < n_fd; i++)
close_nointr_nofail(fds[i]);
}