summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/src/glfs-fops.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c
index 8ee9a20772d..3191ed7009c 100644
--- a/api/src/glfs-fops.c
+++ b/api/src/glfs-fops.c
@@ -158,6 +158,11 @@ glfs_close (struct glfs_fd *glfd)
__glfs_entry_fd (glfd);
subvol = glfs_active_subvol (glfd->fs);
+ if (!subvol) {
+ ret = -1;
+ errno = EIO;
+ goto out;
+ }
fd = glfs_resolve_fd (glfd->fs, subvol, glfd);
if (!fd) {