summaryrefslogtreecommitdiffstats
path: root/xlators/encryption/rot-13/src
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/encryption/rot-13/src')
-rw-r--r--xlators/encryption/rot-13/src/rot-13.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/xlators/encryption/rot-13/src/rot-13.c b/xlators/encryption/rot-13/src/rot-13.c
index a334b669df0..9d5dab03307 100644
--- a/xlators/encryption/rot-13/src/rot-13.c
+++ b/xlators/encryption/rot-13/src/rot-13.c
@@ -145,9 +145,11 @@ init (xlator_t *this)
gf_log (this->name, GF_LOG_WARNING,
"dangling volume. check volfile ");
}
-
- priv = CALLOC (sizeof (rot_13_private_t), 1);
- ERR_ABORT (priv);
+
+ priv = GF_CALLOC (sizeof (rot_13_private_t), 1, 0);
+ if (!priv)
+ return -1;
+
priv->decrypt_read = 1;
priv->encrypt_write = 1;
@@ -174,13 +176,13 @@ init (xlator_t *this)
return 0;
}
-void
+void
fini (xlator_t *this)
{
rot_13_private_t *priv = this->private;
-
- FREE (priv);
-
+
+ GF_FREE (priv);
+
return;
}