]> git.proxmox.com Git - mirror_lxc.git/commit - src/lxc/attach.c
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>
Sat, 24 Jan 2015 21:43:53 +0000 (16:43 -0500)
commitf10fad2f53e3f4f2f862bacf218a5aa7feceb505
tree7c87e325cfc983565c2ec7e43edba46fc9e3f3d2
parentce72f6b466f714b4e7de912ed5546179ddf36a21
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>
19 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_top.c
src/lxc/lxc_user_nic.c
src/lxc/lxc_usernsexec.c
src/lxc/lxccontainer.c
src/lxc/lxclock.c
src/lxc/network.c
src/lxc/parse.c
src/lxc/seccomp.c
src/python-lxc/lxc.c