utils_ovs: fix resource leaks
authorKavanagh, Mark B <mark.b.kavanagh@intel.com>
Tue, 27 Feb 2018 17:28:55 +0000 (17:28 +0000)
committerCiara Loftus <ciara.loftus@intel.com>
Tue, 27 Mar 2018 11:44:47 +0000 (12:44 +0100)
In ovs_db_init(), upon failure of either ovs_db_event_thread_init()
and/or ovs_db_poll_thread_init(), ovs_db_destroy() is invoked, in
order to release OVSDB data resources.

However, in the event that ovs_db_destroy() returns an error value,
some OVSDB resources are never released, and are consequently lost.

Resolve this issue by checking the return value of ovs_db_destroy()
and manually releasing the appropriate resources accordingly.

Fixes: 5a90d0e ("ovs_events: Address PR comments")
Signed-off-by: Kavanagh, Mark B <mark.b.kavanagh@intel.com>

No differences found