From 37bddf06f97fdd0a66cae44fbb50624dba7bc3d9 Mon Sep 17 00:00:00 2001 From: Krisztian Litkey Date: Thu, 6 Nov 2014 16:33:35 +0200 Subject: [PATCH] bluetooth-client: don't try to dereference potential NULL while checking for the impossible. --- src/plugins/bluetooth-client/dbusif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/bluetooth-client/dbusif.c b/src/plugins/bluetooth-client/dbusif.c index 0bfb5d5..bc4e5b4 100644 --- a/src/plugins/bluetooth-client/dbusif.c +++ b/src/plugins/bluetooth-client/dbusif.c @@ -42,7 +42,7 @@ static modem_t *reference_modem(modem_t *modem) if (modem && modem->refcnt >= 0) modem->refcnt++; - return modem->refcnt < 0 ? NULL : modem; + return modem; } static void unreference_modem(modem_t *modem) -- 2.7.4