From 859686a51c1d8da1eccf42fbe3623b3243f4b84b Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Sat, 18 Apr 2015 14:11:19 +0200 Subject: [PATCH] Tracker: Fix use-after-free in info window attribute view dtor. The model was owned by the info window and is gone at the point where the AttributeView is destroyed. Since the extra check whether the model is a symlink isn't really needed at all, I opted to just remove it instead of destroying the AttributeView sooner or unsetting its model. --- src/kits/tracker/InfoWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kits/tracker/InfoWindow.cpp b/src/kits/tracker/InfoWindow.cpp index bdde334e9b..6650cb7894 100644 --- a/src/kits/tracker/InfoWindow.cpp +++ b/src/kits/tracker/InfoWindow.cpp @@ -990,7 +990,7 @@ AttributeView::~AttributeView() if (fDescWindow->Lock()) fDescWindow->Quit(); - if (fModel->IsSymLink() && fIconModel != fModel) + if (fIconModel != fModel) delete fIconModel; }