formatter: fix trailing dump_stream()

Flush a previous dump_stream() if it was the last thing prior to a
close_section().

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
This commit is contained in:
Sage Weil 2012-02-24 12:38:13 -08:00
parent 185c6b1fd8
commit fdaed0a7a2

View File

@ -272,6 +272,7 @@ void XMLFormatter::open_array_section_in_ns(const char *name, const char *ns)
void XMLFormatter::close_section()
{
assert(!m_sections.empty());
finish_pending_string();
print_spaces(false);
m_ss << "</" << m_sections.back() << ">";