]> git.ipfire.org Git - thirdparty/lxc.git/commit
Bug #158: Deletion of unnecessary checks before calls of the function "free"
authorMarkus Elfring <elfring@users.sourceforge.net>
Sat, 24 Jan 2015 18:55:36 +0000 (19:55 +0100)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 28 Aug 2015 20:09:01 +0000 (16:09 -0400)
commitbcbe69f795a1b758eef1b9fb21f9e166b47d74be
tree7639485320a49e78b96696d7da1888903b737d15
parent5aeb7e8ae325d5bde9b7817043593fd5631822af
Bug #158: Deletion of unnecessary checks before calls of the function "free"

The function "free" is documented in the way that no action shall occur for
a passed null pointer. It is therefore not needed that a function caller
repeats a corresponding check.
http://stackoverflow.com/questions/18775608/free-a-null-pointer-anyway-or-check-first

This issue was fixed by using the software Coccinelle 1.0.0-rc23.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
17 files changed:
src/lxc/attach.c
src/lxc/bdev.c
src/lxc/cgfs.c
src/lxc/cgmanager.c
src/lxc/conf.c
src/lxc/confile.c
src/lxc/lsm/apparmor.c
src/lxc/lxc_autostart.c
src/lxc/lxc_snapshot.c
src/lxc/lxc_start.c
src/lxc/lxc_user_nic.c
src/lxc/lxc_usernsexec.c
src/lxc/lxccontainer.c
src/lxc/lxclock.c
src/lxc/parse.c
src/lxc/seccomp.c
src/python-lxc/lxc.c