summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/inode.c
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2010-08-18 07:49:15 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-08-18 06:55:46 -0700
commit3c75958d1948753976405f848f59326fc1896c95 (patch)
treef66374dd0257add11eafd50ed1b6093ed4f80b37 /libglusterfs/src/inode.c
parent0b890833c8cba9bac71877e528d810eba91dd1e6 (diff)
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 <shishirng@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1393 (Gluster and kernel compile fails) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1393
Diffstat (limited to 'libglusterfs/src/inode.c')
-rw-r--r--libglusterfs/src/inode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c
index 0ed60365453..67f4183b47b 100644
--- a/libglusterfs/src/inode.c
+++ b/libglusterfs/src/inode.c
@@ -493,7 +493,7 @@ __dentry_create (inode_t *inode, inode_t *parent, const char *name)
if (!inode || !parent || !name)
return NULL;
- newd = mem_get (parent->table->dentry_pool);
+ newd = mem_get0 (parent->table->dentry_pool);
if (newd == NULL) {
gf_log ("inode", GF_LOG_ERROR, "out of memory");
@@ -530,7 +530,7 @@ __inode_create (inode_table_t *table)
if (!table)
return NULL;
- newi = mem_get(table->inode_pool);
+ newi = mem_get0 (table->inode_pool);
if (!newi) {
gf_log ("inode", GF_LOG_ERROR, "out of memory");
goto out;