1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 09:21:26 +03:00

readahead: fix fd validity check

https://bugzilla.redhat.com/show_bug.cgi?id=868603
This commit is contained in:
Michal Schmidt 2012-10-22 22:07:31 +02:00
parent f1c0ece144
commit c4b996bd87

View File

@ -460,7 +460,7 @@ static int collect(const char *root) {
log_warning("readlink(%s) failed: %s", fn, strerror(-k)); log_warning("readlink(%s) failed: %s", fn, strerror(-k));
next_iteration: next_iteration:
if (m->fd) if (m->fd >= 0)
close_nointr_nofail(m->fd); close_nointr_nofail(m->fd);
} }
} }