diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2014-03-12 19:56:08 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2014-03-08 17:02:27 -0800 |
commit | 40b0bf5fc01a17e9a1628cd9ff537b7e15353958 (patch) | |
tree | 99a476c2d1b5dc1e6d6a98691bf9ebb655d9ee74 /xlators/storage/bd/src/bd-helper.c | |
parent | 0ddd69a60e49f1335ed29a8225e31d24c836083a (diff) |
storage/bd: Fix allocations/deallocations
Change-Id: I39c9eb083fc1c144fe6f011dd983b877fbbff0f7
BUG: 1075717
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/7230
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/storage/bd/src/bd-helper.c')
-rw-r--r-- | xlators/storage/bd/src/bd-helper.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/xlators/storage/bd/src/bd-helper.c b/xlators/storage/bd/src/bd-helper.c index 63e26d8a3a6..4bd1d6111d5 100644 --- a/xlators/storage/bd/src/bd-helper.c +++ b/xlators/storage/bd/src/bd-helper.c @@ -9,6 +9,7 @@ #include <linux/fs.h> #include <sys/ioctl.h> #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; } |