diff mbox

[2/8] utils: Fix possible null pointer dereference.

Message ID 1449744969-14895-2-git-send-email-ilan.peer@intel.com
State Accepted
Headers show

Commit Message

Ilan Peer Dec. 10, 2015, 10:56 a.m. UTC
From: Ayala Beker <ayala.beker@intel.com>

Fix possible null pointer dereference in wpa_debug_open_linux_tracing().

Signed-off-by: Ayala Beker <ayala.beker@intel.com>
---
 src/utils/wpa_debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/src/utils/wpa_debug.c b/src/utils/wpa_debug.c
index 3275524..f7acf6b 100644
--- a/src/utils/wpa_debug.c
+++ b/src/utils/wpa_debug.c
@@ -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;
 		}