[Bluez PATCH 8/8] core: Initialize uuid_str_arr to NULL

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

 



From: Sonny Sasaka <sonnysasaka@xxxxxxxxxxxx>

Not initializing may crash g_free() below.

Reviewed-by: Daniel Winkler <danielwinkler@xxxxxxxxxx>
Reviewed-by: Alain Michaud <alainm@xxxxxxxxxxxx>
---

 src/adapter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/adapter.c b/src/adapter.c
index f03eda2abc17..ab4f8a3ca4d7 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -483,7 +483,7 @@ static void store_adapter_info(struct btd_adapter *adapter)
 	char *str;
 	gsize length = 0;
 	gboolean discoverable;
-	char **uuid_str_arr;
+	char **uuid_str_arr = NULL;
 	guint num_of_uuid = 0;
 	int i;
 
-- 
2.31.0.291.g576ba9dcdaf-goog




[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