summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/default-args.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/default-args.c')
-rw-r--r--libglusterfs/src/default-args.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/libglusterfs/src/default-args.c b/libglusterfs/src/default-args.c
index 29c8aea..1ce907f 100644
--- a/libglusterfs/src/default-args.c
+++ b/libglusterfs/src/default-args.c
@@ -1486,3 +1486,37 @@ args_cbk_wipe (default_args_cbk_t *args_cbk)
if (!list_empty (&args_cbk->entries.list))
gf_dirent_free (&args_cbk->entries);
}
+
+void
+args_wipe (default_args_t *args)
+{
+ if (!args)
+ return;
+
+ if (&args->loc)
+ loc_wipe (&args->loc);
+
+ if (&args->loc2)
+ loc_wipe (&args->loc2);
+
+ if (args->fd)
+ fd_unref (args->fd);
+
+ GF_FREE ((char *)args->linkname);
+
+ GF_FREE (args->vector);
+
+ if (args->iobref)
+ iobref_unref (args->iobref);
+
+ if (args->xattr)
+ dict_unref (args->xattr);
+
+ if (args->xdata)
+ dict_unref (args->xdata);
+
+ GF_FREE ((char *)args->name);
+
+ GF_FREE ((char *)args->volume);
+
+}