From: Josh Oguin <[email protected]>
CodeSonar flagged this as a possible dereference of a NULL pointer.
This should never occur so adding _Assert().
---
cpukit/libfs/src/imfs/imfs_handlers_link.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/cpukit/libfs/src/imfs/imfs_handlers_link.c
b/cpukit/libfs/src/imfs/imfs_handlers_link.c
index 7c2a341..cd71f95 100644
--- a/cpukit/libfs/src/imfs/imfs_handlers_link.c
+++ b/cpukit/libfs/src/imfs/imfs_handlers_link.c
@@ -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 ) {
--
1.9.3
_______________________________________________
devel mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/devel