[haiku-commits] haiku: hrev43623 - src/kits/tracker

  • From: stpere@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 5 Jan 2012 01:23:28 +0100 (CET)

hrev43623 adds 1 changeset to branch 'master'
old head: 68aea33966b03510d4e9afcffb8a488fd8074eaf
new head: aa11dcae4d77ddc43150564915bcfc845d281b5d

----------------------------------------------------------------------------

aa11dca: 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.

                                [ Philippe Saint-Pierre <stpere@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev43623
Commit:      aa11dcae4d77ddc43150564915bcfc845d281b5d
URL:         http://cgit.haiku-os.org/haiku/commit/?id=aa11dca
Author:      Philippe Saint-Pierre <stpere@xxxxxxxxx>
Date:        Thu Jan  5 00:21:12 2012 UTC

----------------------------------------------------------------------------

1 files changed, 2 insertions(+), 0 deletions(-)
src/kits/tracker/InfoWindow.cpp |    2 ++

----------------------------------------------------------------------------

diff --git a/src/kits/tracker/InfoWindow.cpp b/src/kits/tracker/InfoWindow.cpp
index a8a8d26..7fd01a6 100644
--- a/src/kits/tracker/InfoWindow.cpp
+++ b/src/kits/tracker/InfoWindow.cpp
@@ -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


Other related posts:

  • » [haiku-commits] haiku: hrev43623 - src/kits/tracker - stpere