[ovs-dev] [PATCH 2/2] ovsdb-idl: Fix memory leak of ovsdb_idl_db_clear.
Ben Pfaff
blp at ovn.org
Fri Mar 8 00:59:37 UTC 2019
On Tue, Mar 05, 2019 at 06:16:50PM -0800, Han Zhou wrote:
> From: Han Zhou <hzhou8 at ebay.com>
>
> ovsdb_idl_row_destroy() doesn't free the memory of row structure itself.
> This is because of the ovsdb change tracking feature: the deleted row
> may be accessed in the current iteration of main loop. The function
> ovsdb_idl_row_destroy_postprocess() is called at the end of
> ovsdb_idl_run() to free the deleted rows that are not tracked; the
> function ovsdb_idl_db_track_clear() is called (indirectly) by user
> at the end of each main loop iteration to free the deleted rows that
> are tracked. However, in ovsdb_idl_db_clear(), which may be called when
> a session is reset, or when the idl is destroyed, it didn't call
> ovsdb_idl_row_destroy_postprocess(), which would result in all the
> untracked rows leaked. This patch fixes that.
>
> Signed-off-by: Han Zhou <hzhou8 at ebay.com>
Thanks. I applied this patch (but not patch 1).
More information about the dev
mailing list