Re: [ovs-dev] [PATCH] ovsdb: Fix memory leak in execute_update.

2016-08-02 Thread Andy Zhou
On Mon, Aug 1, 2016 at 10:08 AM, William Tu wrote: > Thanks, I've submitted v2 which removes the 'const'. > LGTM. Pushed to master. Thanks for working on this. > > ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH] ovsdb: Fix memory leak in execute_update.

2016-08-01 Thread William Tu
Thanks, I've submitted v2 which removes the 'const'. On Wed, Jul 27, 2016 at 1:39 PM, Ben Pfaff wrote: > On Tue, Jul 26, 2016 at 06:28:30PM -0700, William Tu wrote: >> Valgrind testcase 1804 ovsdb-server.at:1023 insert rows, update rows by value >> reports the following leak. >> json_from_st

Re: [ovs-dev] [PATCH] ovsdb: Fix memory leak in execute_update.

2016-07-27 Thread nickcooper-zhangtonghao
xecute_delete(struct ovsdb_txn *txn, const char *uuid, >> } >> >> ovsdb_condition_destroy(&condition); >> + json_destroy(CONST_CAST(struct json *, where)); >> + >> return error; >> } >> >> @@ -625,6 +627,7 @@ execute_update(s

Re: [ovs-dev] [PATCH] ovsdb: Fix memory leak in execute_update.

2016-07-27 Thread Ben Pfaff
On Tue, Jul 26, 2016 at 06:28:30PM -0700, William Tu wrote: > Valgrind testcase 1804 ovsdb-server.at:1023 insert rows, update rows by value > reports the following leak. > json_from_string (json.c:1025) > execute_update (replication.c:614), similarily at execute_delete() > process_table

Re: [ovs-dev] [PATCH] ovsdb: Fix memory leak in execute_update.

2016-07-27 Thread Andy Zhou
On Tue, Jul 26, 2016 at 6:28 PM, William Tu wrote: > Valgrind testcase 1804 ovsdb-server.at:1023 insert rows, update rows by > value > reports the following leak. > json_from_string (json.c:1025) > execute_update (replication.c:614), similarily at execute_delete() > process_table_upda

Re: [ovs-dev] [PATCH] ovsdb: Fix memory leak in execute_update.

2016-07-27 Thread Ben Pfaff
On Wed, Jul 27, 2016 at 12:18:37PM +0800, nickcooper-zhangtonghao wrote: > If the ‘ovsdb_condition_from_json’ return the error, cnd->clauses will be > set NULL, so ‘ovsdb_condition_destroy’ should check the 'cnd->clauses’ before > free it. Please read CodingStyle.md: Functions that destroy an

Re: [ovs-dev] [PATCH] ovsdb: Fix memory leak in execute_update.

2016-07-27 Thread William Tu
; ovsdb_condition_destroy(&condition); > +json_destroy(CONST_CAST(struct json *, where)); > + > return error; > } > > @@ -625,6 +627,7 @@ execute_update(struct ovsdb_txn *txn, const char *uuid, > ovsdb_row_destroy(row); > ovsdb_column_set_destroy

Re: [ovs-dev] [PATCH] ovsdb: Fix memory leak in execute_update.

2016-07-26 Thread nickcooper-zhangtonghao
_txn *txn, const char *uuid, ovsdb_row_destroy(row); ovsdb_column_set_destroy(&columns); ovsdb_condition_destroy(&condition); +json_destroy(CONST_CAST(struct json *, where)); return error; } -- 1.8.3.1 > From: William Tu > To: dev@openvswitch.org > Subject: [ovs-dev] [PATCH] ovsdb:

[ovs-dev] [PATCH] ovsdb: Fix memory leak in execute_update.

2016-07-26 Thread William Tu
Valgrind testcase 1804 ovsdb-server.at:1023 insert rows, update rows by value reports the following leak. json_from_string (json.c:1025) execute_update (replication.c:614), similarily at execute_delete() process_table_update (replication.c:502) process_notification.part.5 (replicati