[lxc-devel] [lxc/lxc] 85db55: fix segfault on lxc-create with bad template name

GitHub noreply at github.com
Thu Sep 26 13:13:56 UTC 2013


  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: 85db5535c346fcba1ff6c30835ebd3a95214da04
      https://github.com/lxc/lxc/commit/85db5535c346fcba1ff6c30835ebd3a95214da04
  Author: Dwight Engen <dwight.engen at oracle.com>
  Date:   2013-09-26 (Thu, 26 Sep 2013)

  Changed paths:
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  fix segfault on lxc-create with bad template name

- change get_template_path() to only return NULL or non-NULL since one of
  the callers was doing a free(-1) which caused the segfault. Handle the
  NULL template case in the lxcapi_create() caller.

- make sure to free(tpath) in the sha1sum_file() failure case

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





More information about the lxc-devel mailing list