Paolo Bonzini 81e0ab48dd hw: do not pass NULL to memory_region_init from instance_init
This causes the region to outlive the object, because it attaches the
region to /machine.  This is not nice for the "realize" method, but
much worse for "instance_init" because it can cause dangling pointers
after a simple object_new/object_unref pair.

Reported-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1443689999-12182-3-git-send-email-armbru@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
2015-10-09 15:25:56 +02:00
..
2014-07-11 10:17:02 +02:00
2015-05-19 11:40:01 +02:00
2015-06-22 18:20:40 +02:00
2015-09-11 10:45:43 +03:00
2014-04-28 10:21:55 +02:00
2015-02-13 14:09:28 +00:00
2015-07-27 18:11:53 +03:00
2015-02-10 09:27:19 +03:00