From b7ba294c987f0f8b9a2a39067f59e0ffc0463f38 Mon Sep 17 00:00:00 2001
From: Mohammed Rafi KC <rkavunga@redhat.com>
Date: Mon, 6 Jul 2015 12:15:45 +0530
Subject: [PATCH 269/279] snapview-client: Allocate memory using GF_CALLOC
loc->path memory should allocate through
GF_CALLOC/GF_MALLOC, since it uses GF_FREE
from loc_wipe.
Back port of :
>Change-Id: If3030175dfb07b0e0b6c0a30234857f8a0780035
>BUG: 1240184
>Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
>Reviewed-on: http://review.gluster.org/11543
>Tested-by: NetBSD Build System <jenkins@build.gluster.org>
>Reviewed-by: Avra Sengupta <asengupt@redhat.com>
>Reviewed-by: Vijay Bellur <vbellur@redhat.com>
(cherry picked from commit 32207db25eea821dfb1abd033df1013d4b8fc622)
Change-Id: I69f9338dc5ae9950b5344000259558423c3f8618
BUG: 1245915
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Reviewed-on: http://review.gluster.org/11743
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/55152
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Tested-by: Rajesh Joseph <rjoseph@redhat.com>
---
.../features/snapview-client/src/snapview-client.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/xlators/features/snapview-client/src/snapview-client.c b/xlators/features/snapview-client/src/snapview-client.c
index 81e3b20..f1b3899 100644
--- a/xlators/features/snapview-client/src/snapview-client.c
+++ b/xlators/features/snapview-client/src/snapview-client.c
@@ -536,7 +536,7 @@ svc_statfs (call_frame_t *frame, xlator_t *this, loc_t *loc,
* virtual directory from path
*/
subvolume = FIRST_CHILD (this);
- root_loc.path = "/";
+ root_loc.path = gf_strdup("/");
gf_uuid_clear(root_loc.gfid);
root_loc.gfid[15] = 1;
root_loc.inode = inode_ref (loc->inode->table->root);
--
1.7.1