diff options
author | Raghavendra G <raghavendra@gluster.com> | 2010-09-15 00:27:10 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-09-15 00:06:37 -0700 |
commit | abf28c8fd12f662f32c1a81f84620f562de8f14b (patch) | |
tree | e3d91d68aa1795535b6b7899cb9b31bfc6b2eb4d /rpc/rpc-lib/src/rpcsvc.c | |
parent | cfbbf68f8af83521b41b40c07db48897b976b626 (diff) |
memory leak fixes.
- free memory allocated by libc when decoding request arguments in server and
reply in client.
- free memory allocated to saved_frames during connection cleanup.
- free memory allocated for transport name while creating listeners.
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 1438 (memory leaks)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1438
Diffstat (limited to 'rpc/rpc-lib/src/rpcsvc.c')
-rw-r--r-- | rpc/rpc-lib/src/rpcsvc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c index 5f6f6b31053..030e23db74d 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++; } |