summaryrefslogtreecommitdiffstats
path: root/xlators/features/cloudsync/src/cloudsync-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/cloudsync/src/cloudsync-common.c')
-rw-r--r--xlators/features/cloudsync/src/cloudsync-common.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/xlators/features/cloudsync/src/cloudsync-common.c b/xlators/features/cloudsync/src/cloudsync-common.c
index aee1f06a82a..445a31b90e7 100644
--- a/xlators/features/cloudsync/src/cloudsync-common.c
+++ b/xlators/features/cloudsync/src/cloudsync-common.c
@@ -11,6 +11,20 @@
#include "cloudsync-common.h"
void
+cs_xattrinfo_wipe(cs_local_t *local)
+{
+ if (local->xattrinfo.lxattr) {
+ if (local->xattrinfo.lxattr->file_path)
+ GF_FREE(local->xattrinfo.lxattr->file_path);
+
+ if (local->xattrinfo.lxattr->volname)
+ GF_FREE(local->xattrinfo.lxattr->volname);
+
+ GF_FREE(local->xattrinfo.lxattr);
+ }
+}
+
+void
cs_local_wipe(xlator_t *this, cs_local_t *local)
{
if (!local)
@@ -40,5 +54,7 @@ cs_local_wipe(xlator_t *this, cs_local_t *local)
if (local->remotepath)
GF_FREE(local->remotepath);
+ cs_xattrinfo_wipe(local);
+
mem_put(local);
}