From 5acde7b7efc51e18ffeb3d8cafe59beaf9b68631 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 30 Dec 2013 14:05:19 +0200 Subject: [PATCH] core: Fix checking for g_attrib_new failure --- src/device.c | 5 +++++ 1 file changed, 5 insertions(+) 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!"); -- 2.47.3