summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli-xml-output.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c
index 543ea713..72e1264f 100644
--- a/cli/src/cli-xml-output.c
+++ b/cli/src/cli-xml-output.c
@@ -2495,12 +2495,12 @@ cli_xml_output_vol_info (cli_local_t *local, dict_t *dict)
ret = xmlTextWriterEndElement (local->writer);
XML_RET_CHECK_AND_GOTO (ret, out);
}
- GF_FREE (local->get_vol.volname);
+
if (volname) {
+ GF_FREE (local->get_vol.volname);
local->get_vol.volname = gf_strdup (volname);
local->vol_count += count;
}
-
out:
gf_log ("cli", GF_LOG_DEBUG, "Returning %d", ret);
return ret;