From a79bcc5733cb5898abb878fb3cfe8ba27fef7bdf Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 15 Aug 2007 09:58:19 +0000 Subject: check find_adapter return value for NULL --- audio/device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/audio/device.c b/audio/device.c index 87ddf5b7..63ab7778 100644 --- a/audio/device.c +++ b/audio/device.c @@ -206,6 +206,8 @@ struct device *device_register(DBusConnection *conn, return NULL; adapter_path = find_adapter(conn, &src); + if (!adapter_path) + return NULL; dev = g_new0(struct device, 1); -- cgit