summaryrefslogtreecommitdiffstats
path: root/api/src
diff options
context:
space:
mode:
Diffstat (limited to 'api/src')
-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 3aa8ab834..4e1a7ef53 100644
--- a/api/src/glfs-fops.c
+++ b/api/src/glfs-fops.c
@@ -159,6 +159,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) {