On 08/18/12 23:06, Michael Tokarev wrote: > On 19.08.2012 00:51, Stefan Weil wrote: > >> +++ b/qapi/opts-visitor.c >> @@ -416,7 +416,7 @@ opts_visitor_cleanup(OptsVisitor *ov) > >> g_hash_table_destroy(ov->unprocessed_opts); >> } >> g_free(ov->fake_id_opt); >> - memset(ov, '\0', sizeof *ov); >> + g_free(ov); > > Shouldn't the function be named opts_visitor_free() or .._destroy() > in this case? Or should maybe the caller free "ov" instead of > this function? To me it looks like either both free+rename shoud > be made, or none.
All of - string-output-visitor.c - string-input-visitor.c - qmp-output-visitor.c - qmp-input-visitor.c - qapi-dealloc-visitor.c free the visitor in *_cleanup(). (Which is not to say they shouldn't all be renamed, only that the patch uni-forms opts-visitor with the rest.) Thanks, Laszlo