mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-22 06:54:41 +08:00
imfs/imfs_handlers_link.c: Add _Assert for NULL pointer
CodeSonar flagged this as a possible dereference of a NULL pointer. This should never occur so adding _Assert().
This commit is contained in:
committed by
Joel Sherrill
parent
43d6a28fd1
commit
4862532fd9
@@ -78,6 +78,8 @@ static IMFS_jnode_t *IMFS_node_remove_hard_link(
|
||||
{
|
||||
IMFS_jnode_t *target = node->info.hard_link.link_node;
|
||||
|
||||
_Assert( target != NULL );
|
||||
|
||||
if ( target->st_nlink == 1) {
|
||||
target = (*target->control->node_remove)( target );
|
||||
if ( target == NULL ) {
|
||||
|
||||
Reference in New Issue
Block a user