lib/nfs/FileReader: postpone the nfs_close_async() call

If an async opertion is in progress, nfs_close_async() will make
libnfs crash because the RPC callback will dereference an object that
was freed by nfs_close_async().
This commit is contained in:
Max Kellermann
2014-09-26 13:29:44 +02:00
parent edd003b62a
commit 0661fd6f7c
4 changed files with 92 additions and 6 deletions

View File

@@ -150,6 +150,13 @@ public:
i->Cancel();
}
CT &Get(reference_type p) {
auto i = Find(p);
assert(i != list.end());
return *i;
}
};
#endif