rstp: Fix memory leak reported by valgrind.
authorWilliam Tu <u9012063@gmail.com>
Tue, 5 Jan 2016 21:38:42 +0000 (13:38 -0800)
committerBen Pfaff <blp@ovn.org>
Mon, 11 Jan 2016 17:18:01 +0000 (09:18 -0800)
commitd36de1d1ee60f03e5b9616a4e52538f56579eca4
treeeabf1710aab7df737cf563996d98f39409d4c4b3
parent43d68d98ed6274fe4b7cc8cc66bca65fa5a0a37c
rstp: Fix memory leak reported by valgrind.

test case: 1650 RSTP Single bridge, call stacks
    hmap_insert_at (hmap.h:235)
    rstp_port_set_port_number__ (rstp.c:744)
    rstp_add_port (rstp.c:1164)
    new_bridge (test-rstp.c:123)
    test_rstp_main (test-rstp.c:514)
    ovstest_wrapper_test_rstp_main__ (test-rstp.c:714)
    ovs_cmdl_run_command (command-line.c:121)
    main (ovstest.c:132)
fix it by adding hmap_destroy() at rstp_unref()

Signed-off-by: William Tu <u9012063@gmail.com>
Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Co-authored-by: Daniele Di Proietto <diproiettod@vmware.com>
Acked-by: Daniele Venturino <daniele.venturino@m3s.it>
Signed-off-by: Ben Pfaff <blp@ovn.org>
lib/rstp.c