summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2013-12-30 14:05:19 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2013-12-30 14:05:19 +0200
commit5acde7b7efc51e18ffeb3d8cafe59beaf9b68631 (patch)
treef0dd685ea745be1028ad68023295e81d25ddd43c /src
parent877dbcdb0bf125696c0753158906ab71d53b9e3f (diff)
core: Fix checking for g_attrib_new failure
Diffstat (limited to 'src')
-rw-r--r--src/device.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/device.c b/src/device.c
index 18543ee2f..6fec701bd 100644
--- a/src/device.c
+++ b/src/device.c
@@ -3267,6 +3267,11 @@ static void att_connect_cb(GIOChannel *io, GError *gerr, gpointer user_data)
}
attrib = g_attrib_new(io);
+ if (!attrib) {
+ error("Unable to create new GAttrib instance");
+ goto done;
+ }
+
device->attachid = attrib_channel_attach(attrib);
if (device->attachid == 0)
error("Attribute server attach failure!");