From 927aedbb556ee07250248181f52642eeb6de9e58 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Wed, 28 Jul 2010 03:31:10 +0000 Subject: removed last few remaining 'ERR_ABORT's from codebase Signed-off-by: Amar Tumballi Signed-off-by: Anand V. Avati BUG: 966 (NULL check for avoiding NULL dereferencing of pointers..) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=966 --- libglusterfs/src/call-stub.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libglusterfs/src/call-stub.c') diff --git a/libglusterfs/src/call-stub.c b/libglusterfs/src/call-stub.c index 233a16162..497637fa9 100644 --- a/libglusterfs/src/call-stub.c +++ b/libglusterfs/src/call-stub.c @@ -1738,7 +1738,8 @@ fop_readdirp_cbk_stub (call_frame_t *frame, if (op_ret > 0) { list_for_each_entry (entry, &entries->list, list) { stub_entry = gf_dirent_for_name (entry->d_name); - ERR_ABORT (stub_entry); + if (!stub_entry) + goto out; stub_entry->d_off = entry->d_off; stub_entry->d_ino = entry->d_ino; stub_entry->d_stat = entry->d_stat; @@ -1780,11 +1781,12 @@ fop_readdir_cbk_stub (call_frame_t *frame, if (op_ret > 0) { list_for_each_entry (entry, &entries->list, list) { stub_entry = gf_dirent_for_name (entry->d_name); - ERR_ABORT (stub_entry); + if (!stub_entry) + goto out; stub_entry->d_off = entry->d_off; stub_entry->d_ino = entry->d_ino; - list_add_tail (&stub_entry->list, + list_add_tail (&stub_entry->list, &stub->args.readdir_cbk.entries.list); } } -- cgit