eal: fix check for default plugin directory
The check for the existence of the default plugin directory calls stat
using an incorrect variable, which will cause a NULL pointer dereference
error.
Coverity issue: 198440
Fixes: d6a4399cdf
("eal: avoid error for non-existent default PMD path")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Aaron Conole <aconole@redhat.com>
This commit is contained in:
parent
29906b9743
commit
dd74b786f2
@ -280,7 +280,7 @@ eal_plugins_init(void)
|
||||
struct shared_driver *solib = NULL;
|
||||
struct stat sb;
|
||||
|
||||
if (*default_solib_dir != '\0' && stat(solib->name, &sb) == 0 &&
|
||||
if (*default_solib_dir != '\0' && stat(default_solib_dir, &sb) == 0 &&
|
||||
S_ISDIR(sb.st_mode))
|
||||
eal_plugin_add(default_solib_dir);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user