If send_new_connection failed NULL err pointer would be dereferenced. --- src/profile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/profile.c b/src/profile.c index c9ff553..b98db36 100644 --- a/src/profile.c +++ b/src/profile.c @@ -800,7 +800,7 @@ static void ext_connect(GIOChannel *io, GError *err, gpointer user_data) drop: if (conn->cb) { - conn->cb(&ext->p, conn->device, -err->code); + conn->cb(&ext->p, conn->device, err ? -err->code : -EIO); conn->cb = NULL; } if (io_err) -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html