[ovs-git] [openvswitch/ovs] e1ca91: ovsdb-server: Fix memory leak

GitHub noreply at github.com
Thu Nov 2 21:23:00 UTC 2017


  Branch: refs/heads/branch-2.8
  Home:   https://github.com/openvswitch/ovs
  Commit: e1ca91b45b5b90582963052569b3c006e3974a24
      https://github.com/openvswitch/ovs/commit/e1ca91b45b5b90582963052569b3c006e3974a24
  Author: Yifeng Sun <pkusunyifeng at gmail.com>
  Date:   2017-11-02 (Thu, 02 Nov 2017)

  Changed paths:
    M ovsdb/ovsdb-server.c

  Log Message:
  -----------
  ovsdb-server: Fix memory leak

Valgrind testcase 2349 (ovn -- DSCP marking check) reports the leak below:
21 bytes in 21 blocks are definitely lost in loss record 24 of 362
    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    by 0x436FD4: xmalloc (util.c:120)
    by 0x437044: xmemdup0 (util.c:150)
    by 0x408C97: add_manager_options (ovsdb-server.c:709)
    by 0x408C97: query_db_remotes (ovsdb-server.c:765)
    by 0x408C97: reconfigure_remotes (ovsdb-server.c:926)
    by 0x406273: main_loop (ovsdb-server.c:194)
    by 0x406273: main (ovsdb-server.c:434)

When options are freed, options->role need to be freed explicitly.

Signed-off-by: Yifeng Sun <pkusunyifeng at gmail.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>




More information about the git mailing list