utils: Fix NULL pointer dereference with unexpected kernel behavior
Fix mostly theoretical NULL pointer dereference in wpa_debug_open_linux_tracing() if /proc/mounts were to return a malformed line. Signed-off-by: Ayala Beker <ayala.beker@intel.com>
This commit is contained in:
parent
1b3dd69d93
commit
819ad5b70b
1 changed files with 1 additions and 1 deletions
|
@ -148,7 +148,7 @@ int wpa_debug_open_linux_tracing(void)
|
|||
strtok_r(line, " ", &tmp2);
|
||||
tmp_path = strtok_r(NULL, " ", &tmp2);
|
||||
fstype = strtok_r(NULL, " ", &tmp2);
|
||||
if (strcmp(fstype, "debugfs") == 0) {
|
||||
if (fstype && strcmp(fstype, "debugfs") == 0) {
|
||||
path = tmp_path;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue