diff options
| author | Marcel Apfelbaum | 2013-12-02 15:20:59 +0100 |
|---|---|---|
| committer | Michael S. Tsirkin | 2013-12-11 19:11:09 +0100 |
| commit | 6307d974f9a28bb6652352f52da97f820427d29d (patch) | |
| tree | f2b10d4785a030bfaa0763c5b9d964026965efa4 /memory.c | |
| parent | hpet: enable to entitle more irq pins for hpet (diff) | |
| download | qemu-6307d974f9a28bb6652352f52da97f820427d29d.tar.gz qemu-6307d974f9a28bb6652352f52da97f820427d29d.tar.xz qemu-6307d974f9a28bb6652352f52da97f820427d29d.zip | |
memory.c: bugfix - ref counting mismatch in memory_region_find
'address_space_get_flatview' gets a reference to a FlatView.
If the flatview lookup fails, the code returns without
"unreferencing" the view.
Cc: qemu-stable@nongnu.org
Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'memory.c')
| -rw-r--r-- | memory.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1596,6 +1596,7 @@ MemoryRegionSection memory_region_find(MemoryRegion *mr, view = address_space_get_flatview(as); fr = flatview_lookup(view, range); if (!fr) { + flatview_unref(view); return ret; } |
