memory.c: bugfix - ref counting mismatch in memory_region_find
commit6307d974f9a28bb6652352f52da97f820427d29d
authorMarcel Apfelbaum <marcel.a@redhat.com>
Mon, 2 Dec 2013 14:20:59 +0000 (2 16:20 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 11 Dec 2013 18:11:09 +0000 (11 20:11 +0200)
treef2b10d4785a030bfaa0763c5b9d964026965efa4
parent7a10ef51c2397ac4323bc786af02c58b413b5cd2
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>
memory.c