1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

coverity: check cmd pointer exists

Since in _report_init() we check few times for cmd != NULL
keep it consistent and Coverity happier.
This commit is contained in:
Zdenek Kabelac 2016-02-23 21:02:36 +01:00
parent 68955a8102
commit a9634e993a

View File

@ -4384,7 +4384,7 @@ static int _report_init(const struct command *cmd, const char *subcommand)
selection, NULL, NULL)))
goto_out;
if ((_report_type & DR_TREE) && !_build_whole_deptree(cmd)) {
if ((_report_type & DR_TREE) && cmd && !_build_whole_deptree(cmd)) {
err("Internal device dependency tree creation failed.");
goto out;
}