summaryrefslogtreecommitdiffstats
path: root/xlators/features
diff options
context:
space:
mode:
authorRyan Ding <ryan.ding@open-fs.com>2016-08-24 00:08:12 +0800
committerJeff Darcy <jdarcy@redhat.com>2016-10-18 07:13:08 -0700
commit975c5572a8300c81e127c27e677974f49e96bd5d (patch)
treebfa14ed2f74976ce80c4c3bd56cf280cbc595960 /xlators/features
parentf5f22d0a84e77162fd5e5afd8e912cef6d8ad320 (diff)
features/read-only: reten_mode is invalid to be free by mem_put()
priv->reten_mode is initialised by option 'retention-mode'. and it reference the memory in this->options. so fini() use mem_put to free priv->reten_mode will cause a problem. there is no need to call mem_put(), so just remove it will be fine. Change-Id: Iee6f9d1d54df38cba8c9b9100e2824f4f2b18ab4 BUG: 1369523 Signed-off-by: Ryan Ding <ryan.ding@open-fs.com> Reviewed-on: http://review.gluster.org/15296 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/features')
-rw-r--r--xlators/features/read-only/src/worm.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/xlators/features/read-only/src/worm.c b/xlators/features/read-only/src/worm.c
index 5ba6641fca2..eec3b384212 100644
--- a/xlators/features/read-only/src/worm.c
+++ b/xlators/features/read-only/src/worm.c
@@ -480,13 +480,6 @@ init (xlator_t *this)
goto out;
}
- priv->reten_mode = mem_get0 (this->local_pool);
- if (!priv->reten_mode) {
- gf_log (this->name, GF_LOG_ERROR, "Error allocating "
- "reten_mode");
- goto out;
- }
-
GF_OPTION_INIT ("worm", priv->readonly_or_worm_enabled,
bool, out);
GF_OPTION_INIT ("worm-file-level", priv->worm_file, bool, out);
@@ -536,10 +529,6 @@ fini (xlator_t *this)
priv = this->private;
if (!priv)
goto out;
- if (priv->reten_mode != NULL) {
- mem_put (priv->reten_mode);
- priv->reten_mode = NULL;
- }
mem_put (priv);
this->private = NULL;
mem_pool_destroy (this->local_pool);