Diff between 2ca37959300f1caa138dc876c3c635574a6a406d and aba6eafcd6c1204f82f6231d104023d7904489f5

Changed Files

File Additions Deletions Status
src/device.c +1 -1 modified

Full Patch

diff --git a/src/device.c b/src/device.c
index fbfbe10..2c6f8bb 100644
--- a/src/device.c
+++ b/src/device.c
@@ -4022,7 +4022,7 @@ static sdp_list_t *read_device_records(struct btd_device *device)
 	g_key_file_load_from_file(key_file, filename, 0, NULL);
 	keys = g_key_file_get_keys(key_file, "ServiceRecords", NULL, NULL);
 
-	for (handle = keys; *handle; handle++) {
+	for (handle = keys; handle && *handle; handle++) {
 		str = g_key_file_get_string(key_file, "ServiceRecords",
 						*handle, NULL);
 		if (!str)