CID 5772: Delete the unneeded (and leaked) ref on the loop end case.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40005 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
97d3d5a1d3
commit
7f6caa088c
@ -300,8 +300,10 @@ FolderNavigator::_BuildEntryList()
|
||||
while (true) {
|
||||
entry_ref* ref = new entry_ref();
|
||||
status_t status = fFolder.GetNextRef(ref);
|
||||
if (status != B_OK)
|
||||
if (status != B_OK) {
|
||||
delete ref;
|
||||
break;
|
||||
}
|
||||
|
||||
fEntries.AddItem(ref);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user