forked from OSchip/llvm-project
Static analyzer noticed that a null get_pending_items_caller could
be used. Guard against that. llvm-svn: 251584
This commit is contained in:
parent
8fe108766f
commit
d76b2a42f2
|
@ -178,7 +178,6 @@ AppleGetPendingItemsHandler::SetupGetPendingItemsFunction (Thread &thread, Value
|
|||
{
|
||||
if (log)
|
||||
log->Printf("No pending-items introspection code found.");
|
||||
errors.Printf ("No pending-items introspection code found.");
|
||||
return LLDB_INVALID_ADDRESS;
|
||||
}
|
||||
|
||||
|
@ -202,6 +201,13 @@ AppleGetPendingItemsHandler::SetupGetPendingItemsFunction (Thread &thread, Value
|
|||
|
||||
errors.Clear();
|
||||
|
||||
if (get_pending_items_caller == nullptr)
|
||||
{
|
||||
if (log)
|
||||
log->Printf ("Failed to get get_pending_items_caller.");
|
||||
return LLDB_INVALID_ADDRESS;
|
||||
}
|
||||
|
||||
// Now write down the argument values for this particular call. This looks like it might be a race condition
|
||||
// if other threads were calling into here, but actually it isn't because we allocate a new args structure for
|
||||
// this call by passing args_addr = LLDB_INVALID_ADDRESS...
|
||||
|
|
Loading…
Reference in New Issue