PVS V522: PathMonitor: NULL pointer dereference

Change-Id: I77df9c18960eee0183145441d3a1bd4ceb112147
Reviewed-on: https://review.haiku-os.org/c/1662
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Adrien Destugues
2019-07-29 21:31:36 +00:00
committed by waddlesplash
parent 4950607607
commit 7bdc1a190c
+1 -1
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();