vfs: check userland buffers before reading them.
[haiku.git] / src / kits / debugger / files / LocatableEntry.cpp
bloba4e22479615be4c18c8ae9190afc804494ed2ecb
1 /*
2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
6 #include "LocatableEntry.h"
8 #include "AutoLocker.h"
10 #include "LocatableDirectory.h"
13 // #pragma mark - LocatableEntryOwner
16 LocatableEntryOwner::~LocatableEntryOwner()
21 // #pragma mark - LocatableEntry
24 LocatableEntry::LocatableEntry(LocatableEntryOwner* owner,
25 LocatableDirectory* parent)
27 fOwner(owner),
28 fParent(parent),
29 fState(LOCATABLE_ENTRY_UNLOCATED)
31 if (fParent != NULL)
32 fParent->AcquireReference();
36 LocatableEntry::~LocatableEntry()
38 if (fParent != NULL)
39 fParent->ReleaseReference();
43 void
44 LocatableEntry::LastReferenceReleased()
46 fOwner->LocatableEntryUnused(this);