]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Formatter: json: clear pending stream string
authorYehuda Sadeh <yehuda@redhat.com>
Thu, 29 Nov 2018 14:47:49 +0000 (06:47 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Tue, 11 Dec 2018 09:00:22 +0000 (01:00 -0800)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/common/Formatter.cc

index 2a013e18d6b4248860e580b3ffd4b12f37f97b36..703322e8a0b75c0477a42a5a9e5ea74b432d296b 100644 (file)
@@ -254,6 +254,7 @@ void JSONFormatter::finish_pending_string()
   if (m_is_pending_string) {
     m_is_pending_string = false;
     add_value(m_pending_name.c_str(), m_pending_string.str(), true);
+    m_pending_string.str("");
   }
 }