[ovs-git] [ovn-org/ovn] b75152: ovn-controller: Fix the memory leak in ref lflow h...

numansiddique noreply at github.com
Wed Jul 8 16:58:15 UTC 2020


  Branch: refs/heads/branch-20.03
  Home:   https://github.com/ovn-org/ovn
  Commit: b75152453da1b714bf864d8bd6fd921f5b06926d
      https://github.com/ovn-org/ovn/commit/b75152453da1b714bf864d8bd6fd921f5b06926d
  Author: Numan Siddique <numans at ovn.org>
  Date:   2020-07-08 (Wed, 08 Jul 2020)

  Changed paths:
    M controller/lflow.c

  Log Message:
  -----------
  ovn-controller: Fix the memory leak in ref lflow handling.

Valgrind found this:

tests/testsuite.dir/129/valgrind.415:12:==415== 4 bytes in 1 blocks are definitely lost in loss record 2 of 126
tests/testsuite.dir/129/valgrind.415-13-==415==    at 0x4C29E63: malloc (vg_replace_malloc.c:309)
tests/testsuite.dir/129/valgrind.415-14-==415==    by 0x4CEC87: xmalloc (util.c:138)
tests/testsuite.dir/129/valgrind.415-15-==415==    by 0x4CECF4: xmemdup0 (util.c:168)
tests/testsuite.dir/129/valgrind.415-16-==415==    by 0x4118AF: lflow_resource_add (lflow.c:231)
tests/testsuite.dir/129/valgrind.415-17-==415==    by 0x412507: consider_logical_flow (lflow.c:670)
tests/testsuite.dir/129/valgrind.415-18-==415==    by 0x4148C2: add_logical_flows (lflow.c:303)
tests/testsuite.dir/129/valgrind.415-19-==415==    by 0x4148C2: lflow_run (lflow.c:858)
tests/testsuite.dir/129/valgrind.415-20-==415==    by 0x42A16C: en_flow_output_run (ovn-controller.c:1765)
tests/testsuite.dir/129/valgrind.415-21-==415==    by 0x43FFE0: engine_compute (inc-proc-eng.c:310)
tests/testsuite.dir/129/valgrind.415-22-==415==    by 0x43FFE0: engine_run_node (inc-proc-eng.c:352)
tests/testsuite.dir/129/valgrind.415-23-==415==    by 0x43FFE0: engine_run (inc-proc-eng.c:377)
tests/testsuite.dir/129/valgrind.415-24-==415==    by 0x40995E: main (ovn-controller.c:2425)

ref_name member of 'struct ref_lflow_node' was not freed when handling the
port binding/address set/port group changes in lflow.c

This patch fixes this issue.

Fixes: 8a2c19f26ffa("ovn-controller: Incremental processing for address-set changes.")
Reported-by: Dumitru Ceara <dceara at redhat.com>
Acked-by: Dumitru Ceara <dceara at redhat.com>
Signed-off-by: Numan Siddique <numans at ovn.org>

(cherry-picked from master commit 12776c585c9a876fea52c376b1df57728db2c4dc)




More information about the git mailing list