xen-pciback: fix up cleanup path when alloc fails
When allocating a pciback device fails, clear the private field. This could lead to an use-after free, however the 'really_probe' takes care of setting dev_set_drvdata(dev, NULL) in its failure path (which we would exercise if the ->probe function failed), so we we are OK. However lets be defensive as the code can change. Going forward we should clean up the pci_set_drvdata(dev, NULL) in the various code-base. That will be for another day. Reviewed-by: NBoris Ostrovsky <boris.ostrovsky@oracle.com> Reported-by: NJonathan Creekmore <jonathan.creekmore@gmail.com> Signed-off-by: NDoug Goldstein <cardoe@cardoe.com> Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Showing
想要评论请 注册 或 登录