From 86ee9d3e144d2371e5ae7edf663916b8da6d2616 Mon Sep 17 00:00:00 2001 From: Pavan Sondur Date: Mon, 17 May 2010 04:42: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(-) (limited to 'xlators') diff --git a/xlators/cluster/afr/src/afr-dir-read.c b/xlators/cluster/afr/src/afr-dir-read.c index 0f9bdf59ea..e23aa414fe 100644 --- a/xlators/cluster/afr/src/afr-dir-read.c +++ b/xlators/cluster/afr/src/afr-dir-read.c @@ -240,7 +240,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