summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-06-24 13:28:39 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-06-24 13:28:39 +0000
commiteb8c45dfdf878614e2ea9cecbe3187058b92e020 (patch)
tree083eaaca38b016920fd98d9253623cd7b89ca380 /cpukit/libfs
parent2010-06-24 Arnout Vandecappelle <arnout@mind.be> (diff)
downloadrtems-eb8c45dfdf878614e2ea9cecbe3187058b92e020.tar.bz2
2010-06-24 Joel Sherrill <joel.sherrilL@OARcorp.com>
PR 1587/filesystem Coverity Id 35 * libfs/src/rfs/rtems-rfs-shell.c: Address possible NULL dereference.
Diffstat (limited to 'cpukit/libfs')
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-shell.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-shell.c b/cpukit/libfs/src/rfs/rtems-rfs-shell.c
index c192c9d0fe..a11b68cecf 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-shell.c
+++ b/cpukit/libfs/src/rfs/rtems-rfs-shell.c
@@ -738,6 +738,11 @@ rtems_shell_rfs_format (int argc, char* argv[])
}
}
+ if (!driver) {
+ printf ("error: no driver name provided\n");
+ return 1;
+ }
+
if (rtems_rfs_format (driver, &config) < 0)
{
printf ("error: format of %s failed: %s\n",