[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-bluetooth
Subject: [PATCH 5/8] Added NULL check before dereferencing
From: Pavel Raiskup <praiskup () redhat ! com>
Date: 2011-08-30 13:11:54
Message-ID: 1314709914-13418-1-git-send-email-praiskup () redhat ! com
[Download RAW message or body]
---
plugins/hciops.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/plugins/hciops.c b/plugins/hciops.c
index ecc0e86..e975eb5 100644
--- a/plugins/hciops.c
+++ b/plugins/hciops.c
@@ -593,7 +593,8 @@ static gboolean init_adapter(int index)
} else {
adapter = manager_find_adapter(&dev->bdaddr);
/* FIXME: manager_find_adapter should return a new ref */
- btd_adapter_ref(adapter);
+ if (adapter)
+ btd_adapter_ref(adapter);
}
if (adapter == NULL)
--
1.7.4.4
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic