Tracker (InfoWindow): small memory leak fix
In the case of a broken symlink, a Model object was leaked when trying to get the icon of the target. CID 5844.
This commit is contained in:
@@ -851,6 +851,8 @@ AttributeView::AttributeView(BRect rect, Model *model)
|
||||
if (resolvedModel->InitCheck() == B_OK)
|
||||
fIconModel = resolvedModel;
|
||||
// broken link, just show the symlink
|
||||
else
|
||||
delete resolvedModel;
|
||||
}
|
||||
|
||||
// Create the rect for displaying the icon
|
||||
|
||||
Reference in New Issue
Block a user