summaryrefslogtreecommitdiffstats
path: root/api/src/glfs-fops.c
diff options
context:
space:
mode:
authorVijay Bellur <vbellur@redhat.com>2013-07-30 12:29:35 +0530
committerAnand Avati <avati@redhat.com>2013-07-30 19:50:50 -0700
commit0bbdfa3d403a90fa0f30e0e5bd56644c875c12c1 (patch)
tree9cac0af2d6cccd3c00717485944f964bf2a16436 /api/src/glfs-fops.c
parent04536e53082cdff5cd10a804502347ee83490c81 (diff)
api: Avoid a NULL deref in glfs_open().
Change-Id: I23e9fabcb8a430bcd44595ca31460c54d7bd4a39 BUG: 953694 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/5426 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'api/src/glfs-fops.c')
-rw-r--r--api/src/glfs-fops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c
index 61b07e9878d..ebd71f08861 100644
--- a/api/src/glfs-fops.c
+++ b/api/src/glfs-fops.c
@@ -136,7 +136,7 @@ out:
if (ret && glfd) {
glfs_fd_destroy (glfd);
glfd = NULL;
- } else {
+ } else if (glfd) {
fd_bind (glfd->fd);
glfs_fd_bind (glfd);
}