From e84a3cf74947d7a6deace07a1726376aa0a8a6a4 Mon Sep 17 00:00:00 2001 From: vinayak hegde Date: Mon, 12 Oct 2009 09:09:33 +0000 Subject: performance/write-behind: file is referenced, without checking for NULL Signed-off-by: Anand V. Avati BUG: 310 (While trying to create a file on replicate with write behind set-up, client crashes.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=310 --- xlators/performance/write-behind/src/write-behind.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xlators/performance/write-behind/src/write-behind.c') diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c index 4fa23a25f..5fbe1c066 100644 --- a/xlators/performance/write-behind/src/write-behind.c +++ b/xlators/performance/write-behind/src/write-behind.c @@ -1725,7 +1725,7 @@ wb_process_queue (call_frame_t *frame, wb_file_t *file, char flush_all) { list_head_t winds, unwinds, other_requests; size_t size = 0; - wb_conf_t *conf = file->this->private; + wb_conf_t *conf = NULL; uint32_t count = 0; int32_t ret = -1; @@ -1738,6 +1738,7 @@ wb_process_queue (call_frame_t *frame, wb_file_t *file, char flush_all) goto out; } + conf = file->this->private; size = conf->aggregate_size; LOCK (&file->lock); { -- cgit