summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib/src
diff options
context:
space:
mode:
Diffstat (limited to 'rpc/rpc-lib/src')
-rw-r--r--rpc/rpc-lib/src/rpc-clnt.c1
-rw-r--r--rpc/rpc-lib/src/rpc-transport.c14
-rw-r--r--rpc/rpc-lib/src/rpcsvc.c3
3 files changed, 13 insertions, 5 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c
index 79be1acae..de4087ad5 100644
--- a/rpc/rpc-lib/src/rpc-clnt.c
+++ b/rpc/rpc-lib/src/rpc-clnt.c
@@ -1394,6 +1394,7 @@ rpc_clnt_destroy (struct rpc_clnt *rpc)
rpc_transport_destroy (rpc->conn.trans);
rpc_clnt_connection_cleanup (&rpc->conn);
rpc_clnt_reconnect_cleanup (&rpc->conn);
+ saved_frames_destroy (rpc->conn.saved_frames);
pthread_mutex_destroy (&rpc->lock);
pthread_mutex_destroy (&rpc->conn.lock);
GF_FREE (rpc);
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;
diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c
index 5f6f6b310..030e23db7 100644
--- a/rpc/rpc-lib/src/rpcsvc.c
+++ b/rpc/rpc-lib/src/rpcsvc.c
@@ -1902,7 +1902,7 @@ rpcsvc_create_listeners (rpcsvc_t *svc, dict_t *options, char *name)
goto out;
}
- ret = asprintf (&transport_name, "%s.%s", tmp, name);
+ ret = gf_asprintf (&transport_name, "%s.%s", tmp, name);
if (ret == -1) {
goto out;
}
@@ -1920,6 +1920,7 @@ rpcsvc_create_listeners (rpcsvc_t *svc, dict_t *options, char *name)
goto out;
}
+ GF_FREE (transport_name);
count++;
}