Message ID | 20201119214337.3886160-1-pavelm@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Fix duplicate free for GATT service includes | expand |
This is automated email and please do not reply to this email! Dear submitter, Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series: PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=387933 ---Test result--- ############################## Test: CheckPatch - FAIL Output: Fix duplicate free for GATT service includes WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #14: bluetoothd: src/gatt-database.c:gatt_db_service_removed() Local GATT service removed - total: 0 errors, 1 warnings, 19 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. "[PATCH] Fix duplicate free for GATT service includes" has style problems, please review. NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPLIT_STRING SSCANF_TO_KSTRTO NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. ############################## Test: CheckGitLint - FAIL Output: Fix duplicate free for GATT service includes 11: B1 Line exceeds max length (84>80): "bluetoothd: src/gatt-database.c:gatt_db_service_removed() Local GATT service removed" 14: B1 Line exceeds max length (94>80): "bluetoothd: src/sdpd-service.c:remove_record_from_server() Removing record with handle 0x10006" 15: B1 Line exceeds max length (94>80): "bluetoothd: src/gatt-database.c:proxy_removed_cb() Proxy removed - removing service: /service1" ############################## Test: CheckBuild - PASS ############################## Test: MakeCheck - PASS --- Regards, Linux Bluetooth
diff --git a/src/gatt-database.c b/src/gatt-database.c index 6694a0174..90cc4bade 100644 --- a/src/gatt-database.c +++ b/src/gatt-database.c @@ -1999,6 +1999,7 @@ static bool parse_includes(GDBusProxy *proxy, struct external_service *service) DBusMessageIter iter; DBusMessageIter array; char *obj; + char *includes; int type; /* Includes property is optional */ @@ -2017,7 +2018,11 @@ static bool parse_includes(GDBusProxy *proxy, struct external_service *service) dbus_message_iter_get_basic(&array, &obj); - if (!queue_push_tail(service->includes, obj)) { + includes = g_strdup(obj); + if (!includes) + return false; + + if (!queue_push_tail(service->includes, includes)) { error("Failed to add Includes path in queue\n"); return false; }