Fixed CID 1294 and 1295: delete the entry_ref on the terminating conditions.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27433 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ryan Leavengood 2008-09-12 06:10:56 +00:00
parent 5043f13cc7
commit 3d65935d2d
1 changed files with 6 additions and 2 deletions

View File

@ -1733,8 +1733,10 @@ GrepWindow::_AreAllFoldersOpenInTracker(BList *folderList)
if (status == B_OK)
windowList.AddItem(static_cast<void*>(tracker_ref));
if (status != B_OK)
if (status != B_OK) {
delete tracker_ref;
break;
}
}
int32 folderCount = folderList->CountItems();
@ -1830,8 +1832,10 @@ GrepWindow::_SelectFilesInTracker(BList* folderList, BMessage* refsMessage)
entry_ref *windowRef = new entry_ref;
status = windowReplyMessage.FindRef("result", windowRef);
if (status != B_OK)
if (status != B_OK) {
delete windowRef;
break;
}
int32 folderCount = folderList->CountItems();