pci: add device realization check before the capability is unlinked 11/23411/6
authorSeokYeon Hwang <syeon.hwang@samsung.com>
Wed, 25 Jun 2014 06:14:36 +0000 (15:14 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Wed, 25 Jun 2014 07:12:59 +0000 (00:12 -0700)
commitcfc381fffc19a4b0fe68e3ba10b261e13005c65d
treed78c5c1eb283bdadf0be71ce5c37b848d893687b
parent3e2af16f7c721033873c61315c31712428aec0bf
pci: add device realization check before the capability is unlinked

"pdev" and its member may be unrealized and be freed, so accessing a member of "pdev" is able to cause heap memory corruption.

Check the change of "device_unparent()" in the commit 5c21ce77d7e5643089ceec556c0408445d017f32.

Change-Id: Iacb195a092c86d4c677ad0404582af104b2251ae
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
hw/pci/pci.c