memory.c: bugfix - ref counting mismatch in memory_region_find
PATCH 1/1 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.
Signed-off-by Marcel Apfelbaum <[email protected]>
--- memory.c | 1 + 1 file changed, 1 insertion(+)
memory.c +1 -0
@@ -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; }
Signature · 1 line
1.8.3.1
Il 02/12/2013 15:20, Marcel Apfelbaum ha scritto:
Quoted 17 lines
'
address_space_get_flatview' gets a reference to a FlatView. If the flatview lookup fails, the code returns without "unreferencing" the view.Signed-off-by Marcel Apfelbaum <[email protected]>--- memory.c | 1 + 1 file changed, 1 insertion(+)memory.c +0
-0
memory.c MemoryRegionSection memory_region_find(MemoryRegion *mr, · line 1602
Quoted 7 lines
memory.c +1
-0@@ -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; }
Reviewed-by Paolo Bonzini <[email protected]>