diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-06-24 13:28:54 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-06-24 13:28:54 +0000 |
commit | 2aba0566375873f551a9e5f1cef7f4a995a5b1cb (patch) | |
tree | a68ff138cf221c354802763320d65e03ab5557ee /cpukit/libfs | |
parent | 2010-06-23 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-2aba0566375873f551a9e5f1cef7f4a995a5b1cb.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.c | 5 |
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", |