From 663bac225369bec7603203727195cad950db8f02 Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Tue, 11 May 2010 03:44:16 +0000 Subject: unref dict by destroying stub in server_stub_resume to avoid leak in lookup and xattrop Signed-off-by: Raghavendra Bhat Signed-off-by: Anand V. Avati BUG: 915 (memory leak in server protocol) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=915 --- xlators/protocol/server/src/server-protocol.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/xlators/protocol/server/src/server-protocol.c b/xlators/protocol/server/src/server-protocol.c index f915717e3..20fab0dd6 100644 --- a/xlators/protocol/server/src/server-protocol.c +++ b/xlators/protocol/server/src/server-protocol.c @@ -2641,8 +2641,7 @@ server_stub_resume (call_stub_t *stub, int32_t op_ret, int32_t op_errno, server_lookup_cbk (stub->frame, NULL, stub->frame->this, -1, ENOENT, NULL, NULL, NULL); - server_loc_wipe (&stub->args.lookup.loc); - FREE (stub); + call_stub_destroy(stub); return 0; } @@ -2701,8 +2700,7 @@ server_stub_resume (call_stub_t *stub, int32_t op_ret, int32_t op_errno, server_xattrop_cbk (stub->frame, NULL, stub->frame->this, -1, ENOENT, NULL); - server_loc_wipe (&stub->args.xattrop.loc); - FREE (stub); + call_stub_destroy(stub); return 0; } -- cgit