summaryrefslogtreecommitdiffstats
path: root/xlators/encryption/rot-13
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-07-28 03:31:10 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-07-28 03:34:54 -0700
commit927aedbb556ee07250248181f52642eeb6de9e58 (patch)
tree034a196708a1c1260951cafeefc42b427bee8479 /xlators/encryption/rot-13
parent753146c0ff4b1b55892b71b36d6ca97797867aaa (diff)
removed last few remaining 'ERR_ABORT's from codebase
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 966 (NULL check for avoiding NULL dereferencing of pointers..) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=966
Diffstat (limited to 'xlators/encryption/rot-13')
-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;
}