summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorRajesh Amaravathi <rajesh@redhat.com>2013-03-21 16:40:16 +0530
committerAnand Avati <avati@redhat.com>2013-03-21 14:06:40 -0700
commit5d19cddd601b2819d2ea908961c7ea9835beccc7 (patch)
tree2be85b21c0dabba6569ba910f449fee31b6ca446 /rpc
parentd8926b5e91091f896b877136238eef87383f72ed (diff)
rpc-transport: fix glusterd crash when rdma.so missing
Add checks before trying to delete vol_opt from list and free Change-Id: I2858f58518394beb8f74fa477be81d7bdd38304f BUG: 924215 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.org/4704 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-lib/src/rpc-transport.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/rpc/rpc-lib/src/rpc-transport.c b/rpc/rpc-lib/src/rpc-transport.c
index c146fb63816..cd004dafbd2 100644
--- a/rpc/rpc-lib/src/rpc-transport.c
+++ b/rpc/rpc-lib/src/rpc-transport.c
@@ -339,8 +339,10 @@ fail:
GF_FREE (name);
- list_del_init (&vol_opt->list);
- GF_FREE (vol_opt);
+ if (vol_opt && !list_empty (&vol_opt->list)) {
+ list_del_init (&vol_opt->list);
+ GF_FREE (vol_opt);
+ }
return NULL;
}