From eb9bc1dc4b1bbb50185469b80fcad3dee659e7bf Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 29 Apr 2013 16:27:14 +0300 Subject: alert: Fix btd_device_get_storage_path failure handling --- profiles/alert/server.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'profiles/alert') diff --git a/profiles/alert/server.c b/profiles/alert/server.c index 4536c817f..58c8b03a5 100644 --- a/profiles/alert/server.c +++ b/profiles/alert/server.c @@ -334,6 +334,10 @@ static gboolean is_notifiable_device(struct btd_device *device, uint16_t ccc) sprintf(handle, "%hu", ccc); filename = btd_device_get_storage_path(device, "ccc"); + if (!filename) { + warn("Unable to get ccc storage path for device"); + return FALSE; + } key_file = g_key_file_new(); g_key_file_load_from_file(key_file, filename, 0, NULL); -- cgit v1.2.1