]> git.proxmox.com Git - mirror_lxc.git/commit
attach: and cgroup.c: be overly cautious
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Wed, 22 May 2013 01:31:04 +0000 (20:31 -0500)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Wed, 22 May 2013 01:31:04 +0000 (20:31 -0500)
commitfa9ac567a7f1593c586cca57362f6b542985e5d7
treedb984fff09ebdf7d0adf928686a6562ca39b4b87
parent20fe4e8febe40f6fc4e4c6f52b91f0af0232e6f5
attach: and cgroup.c: be overly cautious

Realistically (as Dwight points out) it doesn't seem possible that
getline won't return at least one line in this functions, however
just to make absolutely sure we don't get a segv on free(NULL),
check line != NULL before freeing it on exit.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/lxc/attach.c
src/lxc/cgroup.c