From 40b0bf5fc01a17e9a1628cd9ff537b7e15353958 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Wed, 12 Mar 2014 19:56:08 +0530 Subject: storage/bd: Fix allocations/deallocations Change-Id: I39c9eb083fc1c144fe6f011dd983b877fbbff0f7 BUG: 1075717 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/7230 Reviewed-by: Anand Avati Tested-by: Anand Avati --- xlators/storage/bd/src/bd-helper.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'xlators/storage/bd/src/bd-helper.c') diff --git a/xlators/storage/bd/src/bd-helper.c b/xlators/storage/bd/src/bd-helper.c index 63e26d8a3..4bd1d6111 100644 --- a/xlators/storage/bd/src/bd-helper.c +++ b/xlators/storage/bd/src/bd-helper.c @@ -9,6 +9,7 @@ #include #include #include "bd.h" +#include "bd-mem-types.h" #include "run.h" int @@ -242,7 +243,7 @@ __bd_fd_ctx_get (xlator_t *this, fd_t *fd, bd_fd_t **bdfd_p) } uuid_utoa_r (fd->inode->gfid, gfid); - asprintf (&devpath, "/dev/%s/%s", priv->vg, gfid); + gf_asprintf (&devpath, "/dev/%s/%s", priv->vg, gfid); if (!devpath) goto out; @@ -268,7 +269,7 @@ __bd_fd_ctx_get (xlator_t *this, fd_t *fd, bd_fd_t **bdfd_p) ret = 0; out: - FREE (devpath); + GF_FREE (devpath); if (ret) { close (_fd); GF_FREE (bdfd); @@ -701,8 +702,8 @@ out: if (fd2 != -1) close (fd2); - FREE (spath); - FREE (dpath); + GF_FREE (spath); + GF_FREE (dpath); return ret; } -- cgit