This patch adds a check for NULL argument in bt_gatt_server_unref. --- src/shared/gatt-server.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shared/gatt-server.c b/src/shared/gatt-server.c index 2ef9269..ef91289 100644 --- a/src/shared/gatt-server.c +++ b/src/shared/gatt-server.c @@ -1215,6 +1215,9 @@ struct bt_gatt_server *bt_gatt_server_ref(struct bt_gatt_server *server) void bt_gatt_server_unref(struct bt_gatt_server *server) { + if (!server) + return; + if (__sync_sub_and_fetch(&server->ref_count, 1)) return; -- 2.1.0.rc2.206.gedb03e5 -- 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