diff options
Diffstat (limited to 'rpc/rpc-lib/src/rpc-transport.c')
-rw-r--r-- | rpc/rpc-lib/src/rpc-transport.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/rpc/rpc-lib/src/rpc-transport.c b/rpc/rpc-lib/src/rpc-transport.c index 7acf04d02..29f02811f 100644 --- a/rpc/rpc-lib/src/rpc-transport.c +++ b/rpc/rpc-lib/src/rpc-transport.c @@ -902,10 +902,6 @@ rpc_transport_load (glusterfs_ctx_t *ctx, dict_t *options, char *trans_name) goto fail; } - if (name) { - GF_FREE (name); - } - trans->ops = dlsym (handle, "tops"); if (trans->ops == NULL) { gf_log ("rpc-transport", GF_LOG_ERROR, @@ -962,6 +958,11 @@ rpc_transport_load (glusterfs_ctx_t *ctx, dict_t *options, char *trans_name) pthread_mutex_init (&trans->lock, NULL); trans->xl = THIS; return_trans = trans; + + if (name) { + GF_FREE (name); + } + GF_FREE (vol_opt); return return_trans; @@ -978,6 +979,10 @@ fail: GF_FREE (vol_opt); } + if (name) { + GF_FREE (name); + } + return NULL; } @@ -1059,6 +1064,7 @@ rpc_transport_destroy (rpc_transport_t *this) if (this->fini) this->fini (this); pthread_mutex_destroy (&this->lock); + GF_FREE (this->name); GF_FREE (this); fail: return ret; |