Re: [ovs-dev] [PATCH] ovsdb: Fix memory leak reported by Valgrind.
On Tue, Jul 26, 2016 at 08:12:36PM -0700, William Tu wrote: > Valgrind testcase 1967: simple idl, conditional, modify as delete due > to condition - C reports the following leak: > json_array_create_empty (json.c:185) > json_parser_push_array (json.c:1234) > json_parser_input (json.c:1328) > json_lex_input (json.c:945) > json_parser_feed (json.c:1103) > json_from_string (json.c:1025) > parse_json (test-ovsdb.c:227) > update_conditions (test-ovsdb.c:2324) > do_idl (test-ovsdb.c:2389) > ovs_cmdl_run_command (command-line.c:121) > main (test-ovsdb.c:73) > > Signed-off-by: William TuThanks, applied. I changed "ovsdb:" to "test-ovsdb:" in the title to emphasize that this is just a leak in a test case. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [PATCH] ovsdb: Fix memory leak reported by valgrind.
On Mon, Jul 25, 2016 at 11:00:29AM +0300, Liran Schour wrote: > Destroy shash on destroy of session's condition structure. > Reported here: http://openvswitch.org/pipermail/dev/2016-July/075968.html > > Signed-off-by: Liran SchourApplied, thanks! ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
[ovs-dev] [PATCH] ovsdb: Fix memory leak reported by Valgrind.
Valgrind testcase 1967: simple idl, conditional, modify as delete due to condition - C reports the following leak: json_array_create_empty (json.c:185) json_parser_push_array (json.c:1234) json_parser_input (json.c:1328) json_lex_input (json.c:945) json_parser_feed (json.c:1103) json_from_string (json.c:1025) parse_json (test-ovsdb.c:227) update_conditions (test-ovsdb.c:2324) do_idl (test-ovsdb.c:2389) ovs_cmdl_run_command (command-line.c:121) main (test-ovsdb.c:73) Signed-off-by: William Tu--- tests/test-ovsdb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test-ovsdb.c b/tests/test-ovsdb.c index c21001e..4a68bca 100644 --- a/tests/test-ovsdb.c +++ b/tests/test-ovsdb.c @@ -2344,6 +2344,7 @@ update_conditions(struct ovsdb_idl *idl, char *commands) parse_link2_json_clause(idl, add_cmd, json->u.array.elems[i]); } } +json_destroy(json); } } -- 2.5.0 ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [PATCH] ovsdb: Fix memory leak reported by valgrind.
Looks good to me, thanks for fixing it! Acked-by: William TuOn Mon, Jul 25, 2016 at 1:00 AM, Liran Schour wrote: > Destroy shash on destroy of session's condition structure. > Reported here: http://openvswitch.org/pipermail/dev/2016-July/075968.html > > Signed-off-by: Liran Schour > --- > ovsdb/monitor.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/ovsdb/monitor.c b/ovsdb/monitor.c > index 99083e1..9a6fbf5 100644 > --- a/ovsdb/monitor.c > +++ b/ovsdb/monitor.c > @@ -617,6 +617,7 @@ ovsdb_monitor_session_condition_destroy( > shash_delete(>tables, node); > free(mtc); > } > +shash_destroy(>tables); > free(condition); > } > > -- > 2.1.4 > ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev