summaryrefslogtreecommitdiffstats
path: root/api/src/glfs-fops.c
diff options
context:
space:
mode:
Diffstat (limited to 'api/src/glfs-fops.c')
-rw-r--r--api/src/glfs-fops.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c
index 7cb442b5f60..3aa8ab834fa 100644
--- a/api/src/glfs-fops.c
+++ b/api/src/glfs-fops.c
@@ -136,7 +136,8 @@ out:
if (ret && glfd) {
glfs_fd_destroy (glfd);
glfd = NULL;
- } else {
+ } else if (glfd) {
+ glfd->fd->flags = flags;
fd_bind (glfd->fd);
glfs_fd_bind (glfd);
}
@@ -404,7 +405,8 @@ out:
if (ret && glfd) {
glfs_fd_destroy (glfd);
glfd = NULL;
- } else {
+ } else if (glfd) {
+ glfd->fd->flags = flags;
fd_bind (glfd->fd);
glfs_fd_bind (glfd);
}