yang zhang commented on a discussion: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/536#note_126958


Sorry, when if found and fix this issue, my local code is not very up-to-date.
This commit df1d85c0f8ffedf9621accc2a9e6fb8e288a430f conveniently resolved this 
issue by checking whether this variable is NULL, i will  close this MR.
diff --git a/cpukit/libcsupport/src/freenode.c 
b/cpukit/libcsupport/src/freenode.c
index 1e9fd29297..f37b8fae5f 100644
--- a/cpukit/libcsupport/src/freenode.c
+++ b/cpukit/libcsupport/src/freenode.c
@@ -43,8 +43,10 @@

 void rtems_filesystem_location_free( rtems_filesystem_location_info_t *loc )
 {
-  rtems_filesystem_instance_lock( loc );
-  (*loc->mt_entry->ops->freenod_h)( loc );
-  rtems_filesystem_instance_unlock( loc );
-  rtems_filesystem_location_remove_from_mt_entry( loc );
+  if ( loc->mt_entry != NULL ) {
+    rtems_filesystem_instance_lock( loc );
+    (*loc->mt_entry->ops->freenod_h)( loc );
+    rtems_filesystem_instance_unlock( loc );
+    rtems_filesystem_location_remove_from_mt_entry( loc );
+  }
 }

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/536#note_126958
You're receiving this email because of your account on gitlab.rtems.org.


_______________________________________________
bugs mailing list
bugs@rtems.org
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to