PVS V522: PathMonitor: NULL pointer dereference

Change-Id: I77df9c18960eee0183145441d3a1bd4ceb112147
Reviewed-on: https://review.haiku-os.org/c/1662
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Adrien Destugues 2019-07-29 15:17:21 +02:00 committed by waddlesplash
parent 4950607607
commit 7bdc1a190c

View File

@ -1462,7 +1462,7 @@ PathHandler::_EntryCreated(const NotOwningEntryRef& entryRef,
if (directory == NULL) {
// We're out of sync with reality.
if (!dryRun) {
if (Entry* nodeEntry = directory->FirstNodeEntry()) {
if (Entry* nodeEntry = directoryNode->FirstNodeEntry()) {
// remove the entry that is in the way and re-add the proper
// entry
NotOwningEntryRef directoryEntryRef = nodeEntry->EntryRef();