From 7bdc1a190ca9297749cb338ae20d1b1d6f504748 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Mon, 29 Jul 2019 15:17:21 +0200 Subject: [PATCH] PVS V522: PathMonitor: NULL pointer dereference Change-Id: I77df9c18960eee0183145441d3a1bd4ceb112147 Reviewed-on: https://review.haiku-os.org/c/1662 Reviewed-by: waddlesplash --- src/kits/storage/PathMonitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kits/storage/PathMonitor.cpp b/src/kits/storage/PathMonitor.cpp index 1a8d475b6d..08f6d5ed1e 100644 --- a/src/kits/storage/PathMonitor.cpp +++ b/src/kits/storage/PathMonitor.cpp @@ -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();