X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=qemu%2Fhw%2Farm%2Fdigic.c;fp=qemu%2Fhw%2Farm%2Fdigic.c;h=e0f9730325416927b1a2b6f76f6f3d00cd039626;hb=437fd90c0250dee670290f9b714253671a990160;hp=ec8c330602e645677338112d87f4bde49ab0dd12;hpb=5bbd6fe9b8bab2a93e548c5a53b032d1939eec05;p=kvmfornfv.git diff --git a/qemu/hw/arm/digic.c b/qemu/hw/arm/digic.c index ec8c33060..e0f973032 100644 --- a/qemu/hw/arm/digic.c +++ b/qemu/hw/arm/digic.c @@ -20,6 +20,8 @@ * */ +#include "qemu/osdep.h" +#include "qapi/error.h" #include "hw/arm/digic.h" #define DIGIC4_TIMER_BASE(n) (0xc0210000 + (n) * 0x100) @@ -97,6 +99,12 @@ static void digic_class_init(ObjectClass *oc, void *data) DeviceClass *dc = DEVICE_CLASS(oc); dc->realize = digic_realize; + + /* + * Reason: creates an ARM CPU, thus use after free(), see + * arm_cpu_class_init() + */ + dc->cannot_destroy_with_object_finalize_yet = true; } static const TypeInfo digic_type_info = {