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