From 3c75958d1948753976405f848f59326fc1896c95 Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Wed, 18 Aug 2010 07:49:15 +0000 Subject: Fix memory corruption in mem pool Added new interface mem_get0, which calls memset on the mem pool entries being returned. Gluster and Kernel compile should now succeed. Signed-off-by: shishir gowda Signed-off-by: Anand V. Avati BUG: 1393 (Gluster and kernel compile fails) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1393 --- libglusterfs/src/call-stub.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libglusterfs/src/call-stub.c') diff --git a/libglusterfs/src/call-stub.c b/libglusterfs/src/call-stub.c index e505bf7fd3e..89788b3b8dc 100644 --- a/libglusterfs/src/call-stub.c +++ b/libglusterfs/src/call-stub.c @@ -38,8 +38,7 @@ stub_new (call_frame_t *frame, GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - new = mem_get (frame->this->ctx->stub_mem_pool); - memset (new, 0, sizeof (call_stub_t)); + new = mem_get0 (frame->this->ctx->stub_mem_pool); GF_VALIDATE_OR_GOTO ("call-stub", new, out); new->frame = frame; -- cgit