From 6aff97e9698918af6d5e479b0240610d40cbe344 Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Wed, 9 Sep 2009 00:39:12 +0000 Subject: libglusterfsclient: Fix incorrect NULL check for fd We should check fdctx instead. Signed-off-by: Anand V. Avati BUG: 253 (Global bug for libglusterfsclient NULL checks and CALLOC handling fixes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=253 --- libglusterfsclient/src/libglusterfsclient.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libglusterfsclient') diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c index b5388361711..23379ecff7a 100755 --- a/libglusterfsclient/src/libglusterfsclient.c +++ b/libglusterfsclient/src/libglusterfsclient.c @@ -5605,7 +5605,7 @@ glusterfs_fsync (glusterfs_file_t *fd) GF_VALIDATE_OR_GOTO (LIBGF_XL_NAME, fd, out); fdctx = libgf_get_fd_ctx ((fd_t *)fd); - if (!fd) { + if (!fdctx) { gf_log (LIBGF_XL_NAME, GF_LOG_ERROR, "No fd context present"); errno = EBADF; goto out; -- cgit