From abf28c8fd12f662f32c1a81f84620f562de8f14b Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Wed, 15 Sep 2010 00:27:10 +0000 Subject: 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 Signed-off-by: Vijay Bellur BUG: 1438 (memory leaks) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1438 --- rpc/rpc-lib/src/rpcsvc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'rpc/rpc-lib/src/rpcsvc.c') 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++; } -- cgit