Memory leak is reported while running test suite. It is evidenced with the
following report:
==18447== 1,868 (48 direct, 1,820 indirect) bytes in 1 blocks are definitely lost in loss record 45 of 45
==18447== at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==18447== by 0x449C02: xcalloc (util.c:121)
==18447== by 0x432949: jsonrpc_msg_from_json (jsonrpc.c:697)
==18447== by 0x432A8F: jsonrpc_parse_received_message (jsonrpc.c:472)
==18447== by 0x432A8F: jsonrpc_recv.part.7 (jsonrpc.c:338)
==18447== by 0x432D0B: jsonrpc_recv (jsonrpc.c:297)
==18447== by 0x432D0B: jsonrpc_recv_block (jsonrpc.c:402)
==18447== by 0x4330BB: jsonrpc_transact_block (jsonrpc.c:436)
==18447== by 0x40A7C1: is_database_clustered (ovsdb-client.c:1624)
==18447== by 0x40AE3F: do_needs_conversion (ovsdb-client.c:1670)
==18447== by 0x405F76: main (ovsdb-client.c:282)
Signed-off-by: Damijan Skvarc <damjan.skvarc@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
const struct json *row = parse_database_info_reply(
reply, jsonrpc_get_name(rpc), database, NULL);
- return !strcmp(parse_string_column(row, "model"), "clustered");
+ bool clustered = !strcmp(parse_string_column(row, "model"), "clustered");
+ jsonrpc_msg_destroy(reply);
+ return clustered;
}
static void