vzctl set --devices: do not segfault (v2)

This is an addition to commit ea64ee6b9. It fixes segfaults
in four different places when either '--devices' command line
option and/or 'DEVICES=' parameter in configuration file is used.

http://bugzilla.openvz.org/1729

Reported-by: Vyacheslav Nikitin <alien.virus@gmail.com>
Reported-by: Paparaciz <helpaz@gmail.com>
Reported-by: frank <frank@si.ct.upc.edu>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
2 files changed