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:
Philippe Saint-Pierre
2012-01-04 19:23:12 -05:00
parent 68aea33966
commit aa11dcae4d
+2
View File
@@ -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