diff mbox series

[ovs-dev] ovsdb-tool: Fix datum leak in the show-log command.

Message ID 20201217172212.633128-1-i.maximets@ovn.org
State Accepted
Headers show
Series [ovs-dev] ovsdb-tool: Fix datum leak in the show-log command. | expand

Commit Message

Ilya Maximets Dec. 17, 2020, 5:22 p.m. UTC
Fixes: 4e92542cefb7 ("ovsdb-tool: Make "show-log" convert raw JSON to easier-to-read syntax.")
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
---
 ovsdb/ovsdb-tool.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Dumitru Ceara Dec. 17, 2020, 7:29 p.m. UTC | #1
On 12/17/20 6:22 PM, Ilya Maximets wrote:
> Fixes: 4e92542cefb7 ("ovsdb-tool: Make "show-log" convert raw JSON to easier-to-read syntax.")
> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
> ---

Looks good to me, thanks!

Acked-by: Dumitru Ceara <dceara@redhat.com>
Ilya Maximets Dec. 21, 2020, 11:14 p.m. UTC | #2
On 12/17/20 8:29 PM, Dumitru Ceara wrote:
> On 12/17/20 6:22 PM, Ilya Maximets wrote:
>> Fixes: 4e92542cefb7 ("ovsdb-tool: Make "show-log" convert raw JSON to easier-to-read syntax.")
>> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
>> ---
> 
> Looks good to me, thanks!
> 
> Acked-by: Dumitru Ceara <dceara@redhat.com>

Thanks!



Applied to master and backported down to 2.5.

Best regards, Ilya Maximets.
diff mbox series

Patch

diff --git a/ovsdb/ovsdb-tool.c b/ovsdb/ovsdb-tool.c
index 30d0472b2..1b49b6fc8 100644
--- a/ovsdb/ovsdb-tool.c
+++ b/ovsdb/ovsdb-tool.c
@@ -720,6 +720,7 @@  print_db_changes(struct shash *tables, struct smap *names,
                                 ds_init(&s);
                                 ovsdb_datum_to_string(&datum, type, &s);
                                 value_string = ds_steal_cstr(&s);
+                                ovsdb_datum_destroy(&datum, type);
                             } else {
                                 ovsdb_error_destroy(error);
                             }