coverity: fix use-after-free in cgmanager.
coverity: fix use-after-free in cgmanager.

Signed-off-by: Serge Hallyn <3df611b026e4639bee8aef7a4beb2e39fcebb313@ubuntu.com>

DarknessBeforeDawn/lxc,aeris/lxc,tych0/lxc,rowhit/lxc,jirislaby/lxc,major/lxc,sapun/lxc,aeris/lxc,akshaykarle/lxc,caglar10ur/lxc,fwilson42/lxc,armcc/lxc,terceiro/lxc,lisongmin/lxc,tych0/lxc,ss1h2a3tw/lxc,rldleblanc/lxc,armcc/lxc,raspberrypython/lxc,thmo/lxc,thmo/lxc,lazy404/lxc,ss1h2a3tw/lxc,codebauss/lxc,GreatFruitOmsk/lxc,JohnPeacockMessageSystems/lxc,virajs/lxc,hallyn/lxc,sapun/lxc,cjwatson/lxc,hfuCN/lxc,QingweiPeterLan/cs188-lxc,ksperis/lxc,yubo/lxc,LynxChaus/lxc,GreatFruitOmsk/lxc,ioops/lxc,bmoar/lxc,DarknessBeforeDawn/lxc,bostjan/lxc,efiop/lxc,ioops/lxc,hallyn/lxc,ksperis/lxc,Distrotech/lxc,ysbnim/lxc,jirislaby/lxc,thmo/lxc,Distrotech/lxc,Ponce/lxc,ecarrara/lxc,terceiro/lxc,Ponce/lxc,sapun/lxc,akshaykarle/lxc,JohnPeacockMessageSystems/lxc,hallyn/lxc,bmoar/lxc,federicobriata/lxc,major/lxc,akshaykarle/lxc,JohnPeacockMessageSystems/lxc,raspberrypython/lxc,ioops/lxc,lisongmin/lxc,rldleblanc/lxc,hfuCN/lxc,LynxChaus/lxc,LynxChaus/lxc,caglar10ur/lxc,raspberrypython/lxc,christiaan/lxc,ecarrara/lxc,major/lxc,cjwatson/lxc,caglar10ur/lxc,federicobriata/lxc,efiop/lxc,szaszg/lxc,virajs/lxc,terceiro/lxc,lazy404/lxc,ysbnim/lxc,fwilson42/lxc,ss1h2a3tw/lxc,GreatFruitOmsk/lxc,Distrotech/lxc,bmoar/lxc,codebauss/lxc,lazy404/lxc,virajs/lxc,yubo/lxc,QingweiPeterLan/cs188-lxc,aeris/lxc,DarknessBeforeDawn/lxc,efiop/lxc,rldleblanc/lxc,bostjan/lxc,hfuCN/lxc,szaszg/lxc,ecarrara/lxc,yubo/lxc,rowhit/lxc,jirislaby/lxc,fwilson42/lxc,christiaan/lxc,szaszg/lxc,QingweiPeterLan/cs188-lxc,Ponce/lxc,federicobriata/lxc,codebauss/lxc,armcc/lxc,Pelagicore/lxc,Pelagicore/lxc,cjwatson/lxc,christiaan/lxc,ksperis/lxc,bostjan/lxc,lisongmin/lxc,rowhit/lxc,tych0/lxc,ysbnim/lxc,Pelagicore/lxc