From de1fbd0fc7d81d9c6f2091a3c94e3dc02d0a3577 Mon Sep 17 00:00:00 2001 From: Pavan Sondur Date: Mon, 17 May 2010 04:43:46 +0000 Subject: cluster/afr: Don't dereference fd ptr - it might be NULL due to a failed call. Signed-off-by: Pavan Vilas Sondur Signed-off-by: Anand V. Avati BUG: 914 ([3.0.4] Crash in afr_opendir_cbk) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=914 --- xlators/cluster/afr/src/afr-dir-read.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xlators/cluster/afr/src/afr-dir-read.c b/xlators/cluster/afr/src/afr-dir-read.c index 92e23659f32..a9b44579b13 100644 --- a/xlators/cluster/afr/src/afr-dir-read.c +++ b/xlators/cluster/afr/src/afr-dir-read.c @@ -239,7 +239,7 @@ afr_opendir_cbk (call_frame_t *frame, void *cookie, if (local->op_ret == 0) { ret = afr_fd_ctx_set (this, local->fd); - if (!afr_is_opendir_done (this, fd->inode)) { + if (!afr_is_opendir_done (this, local->fd->inode)) { /* * This is the first opendir on this inode. We need -- cgit