Igor Mammedov c9f4b77ad5 pc-dimm: fix error handling in pc_dimm_check_memdev_is_busy()
If host_memory_backend_get_memory() were to return error and
NULL MemoryRegion, pc_dimm_check_memdev_is_busy() would crash
dereferencing NULL pointer in memory_region_is_mapped().
But if error is set and non NULL MemoryRegion is returned
then error_setg() will fail with "error already set" assertion
in error_setv()

To avoid above issues use typical error handling pattern
for property setters:

Error *local_error = NULL;
...
error_propagate(errp, local_err);

Reported-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-03-11 14:55:15 +02:00
..
2016-02-23 12:43:05 +00:00
2016-02-23 12:43:05 +00:00
2016-01-29 15:07:25 +00:00
2016-03-07 13:18:28 +01:00
2016-01-29 15:07:25 +00:00
2016-01-29 15:07:25 +00:00
2016-03-07 13:26:29 +01:00
2016-01-29 15:07:25 +00:00
2016-03-04 11:30:17 +00:00
2016-01-29 15:07:24 +00:00
2016-01-29 15:07:25 +00:00
2016-01-29 15:07:25 +00:00
2016-01-29 15:07:25 +00:00
2016-01-29 15:07:22 +00:00
2016-02-23 12:43:05 +00:00
2016-01-29 15:07:23 +00:00
2015-12-22 18:39:19 +02:00