[rtems commit] shell: Fix NULL pointer access
Sebastian Huber
sebh at rtems.org
Thu May 16 09:35:25 UTC 2013
Module: rtems
Branch: master
Commit: d2d09eac21cef4c88274ea8fccb0e7935a5c4992
Changeset: http://git.rtems.org/rtems/commit/?id=d2d09eac21cef4c88274ea8fccb0e7935a5c4992
Author: Andreas Heinig <andreas.heinig at cs.tu-dortmund.de>
Date: Wed May 15 15:14:28 2013 +0200
shell: Fix NULL pointer access
---
cpukit/libmisc/shell/main_lsof.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cpukit/libmisc/shell/main_lsof.c b/cpukit/libmisc/shell/main_lsof.c
index ed0c87c..2c6ece1 100644
--- a/cpukit/libmisc/shell/main_lsof.c
+++ b/cpukit/libmisc/shell/main_lsof.c
@@ -44,7 +44,7 @@ static void lsof(void)
mt_entry->writeable ? 'W' : 'R',
mt_entry->type,
mt_entry->target,
- mt_entry->dev,
+ mt_entry->dev == NULL ? "none" : mt_entry->dev,
mt_entry->mt_fs_root,
mt_entry->mt_fs_root->location.node_access
);
More information about the vc
mailing list