handle_dbus_gattcharacteristic_from_path: Ensure 'characteristic' is unref

pull/234/head
Olivier Martin 2021-10-17 22:13:38 +02:00 committed by Olivier Martin
parent f90a95bcff
commit e2b189d226
1 changed files with 1 additions and 0 deletions

View File

@ -38,6 +38,7 @@ static bool handle_dbus_gattcharacteristic_from_path(gattlib_context_t* conn_con
if (characteristic_uuid_str == NULL) {
// It should not be expected to get NULL from GATT characteristic UUID but we still test it
fprintf(stderr, "Error: %s path unexpectly returns a NULL UUID.\n", object_path);
g_object_unref(characteristic);
return false;
}