[PATCH] Fix interactive gatttool crash when destination is not set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 attrib/interactive.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/attrib/interactive.c b/attrib/interactive.c
index 52edeac..a171833 100644
--- a/attrib/interactive.c
+++ b/attrib/interactive.c
@@ -698,7 +698,9 @@ int interactive(gchar *dst, int psm)
 
 	opt_sec_level = strdup("low");
 
-	opt_dst = strdup(dst);
+	if (dst)
+		opt_dst = strdup(dst);
+
 	opt_psm = psm;
 
 	prompt = g_string_new(NULL);
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux