summaryrefslogtreecommitdiffstats
path: root/api/src/glfs-fops.c
diff options
context:
space:
mode:
authorLalatendu Mohanty <lmohanty@redhat.com>2014-01-14 12:35:54 +0530
committerVijay Bellur <vbellur@redhat.com>2014-01-16 00:58:49 -0800
commitc9008fe6a1a4d9c25c4b11804bcc9e5b6edf9bec (patch)
tree9b4c66f98b59e3ff06c814a497da3c2d7e227118 /api/src/glfs-fops.c
parentde557c602c8f0480686c4d560f012924ee0de936 (diff)
libgfapi: Fixing possible dereferencing of null pointer "glfd"
Fix: Putting a check so that pointer derefrence does not happen when "gfld" is null Change-Id: I281b10be445bbeec3a2728fc139d5ac94372e5b6 BUG: 789278 Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com> Reviewed-on: http://review.gluster.org/6697 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-by: Vijay Bellur <vbellur@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 b09dd90f7b1..5ea54567d74 100644
--- a/api/src/glfs-fops.c
+++ b/api/src/glfs-fops.c
@@ -1790,7 +1790,7 @@ out:
if (ret && glfd) {
glfs_fd_destroy (glfd);
glfd = NULL;
- } else {
+ } else if (glfd) {
fd_bind (glfd->fd);
glfs_fd_bind (glfd);
}