jsonrpc: Add logging for messages sent and received, at DBG level.
[openvswitch] / lib / dynamic-string.c
index 531e53bbe9ab9f2195d4a7481cd7aeea306439f4..527dee8ab09e288d62195f37e89414281bf2933e 100644 (file)
@@ -115,6 +115,13 @@ ds_put_cstr(struct ds *ds, const char *s)
     memcpy(ds_put_uninit(ds, s_len), s, s_len);
 }
 
+void
+ds_put_and_free_cstr(struct ds *ds, char *s)
+{
+    ds_put_cstr(ds, s);
+    free(s);
+}
+
 void
 ds_put_format(struct ds *ds, const char *format, ...)
 {