[lxc-devel] [lxc/lxc] b65330: split up lxc_cgroup_load_meta2

GitHub noreply at github.com
Wed Sep 25 16:07:59 UTC 2013


  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: b653309a4aec9b0be859bc7fc23215fad07bdbb2
      https://github.com/lxc/lxc/commit/b653309a4aec9b0be859bc7fc23215fad07bdbb2
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2013-09-25 (Wed, 25 Sep 2013)

  Changed paths:
    M src/lxc/cgroup.c

  Log Message:
  -----------
  split up lxc_cgroup_load_meta2

This one's easier to review by looking at the before and after files.  It
splits up lxc_cgroup_load_meta2() by adding 3 helpers.

The result seems easier to reason about.  A question I had, is, should
the kernel_subsystems ** be freed in the success case?  I assumed it was
being used elsewhere but I can't find where.  Currently it is only being
freed in the error case.  I suspect we want to free it in the success
case as well.

Cc: Christian Seiler <christian at iwakd.de>
Cc: Dwight Engen <dwight.engen at oracle.com>
Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>


  Commit: 178938fe0ac891092205d76f67af855dcf7397af
      https://github.com/lxc/lxc/commit/178938fe0ac891092205d76f67af855dcf7397af
  Author: Dwight Engen <dwight.engen at oracle.com>
  Date:   2013-09-25 (Wed, 25 Sep 2013)

  Changed paths:
    M src/lxc/cgroup.c

  Log Message:
  -----------
  fix some larger memory leaks in cgroup code

Don't worry about saved_errno since none of the *_free routines will set it

Signed-off-by: Dwight Engen <dwight.engen at oracle.com>
Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>


Compare: https://github.com/lxc/lxc/compare/7cb14f34a92e...178938fe0ac8


More information about the lxc-devel mailing list