aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--src/lib/nfs/Connection.cxx6
2 files changed, 6 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index b40023771..c1f967b74 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,6 @@
ver 0.19.7 (not yet released)
+* input
+ - nfs: fix crash while canceling a failing file open operation
* playlist
- don't skip non-existent songs in "listplaylist"
* fix memory allocator bug on Windows
diff --git a/src/lib/nfs/Connection.cxx b/src/lib/nfs/Connection.cxx
index 410711275..c57cb9b79 100644
--- a/src/lib/nfs/Connection.cxx
+++ b/src/lib/nfs/Connection.cxx
@@ -156,8 +156,10 @@ NfsConnection::CancellableCallback::Callback(int err, void *data)
allocated file handle immediately */
assert(close_fh == nullptr);
- struct nfsfh *fh = (struct nfsfh *)data;
- connection.Close(fh);
+ if (err >= 0) {
+ struct nfsfh *fh = (struct nfsfh *)data;
+ connection.Close(fh);
+ }
} else if (close_fh != nullptr)
connection.DeferClose(close_fh);