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>
This commit is contained in:
Lalatendu Mohanty 2014-01-14 12:35:54 +05:30 committed by Vijay Bellur
parent de557c602c
commit c9008fe6a1

View File

@ -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);
}