From b2d85659223b628d17bb5f69e00d6f514761cba6 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 17 Jun 2010 21:31:32 +0300 Subject: Fix missing error check to dbus_message_get_args --- audio/telephony-maemo6.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/audio/telephony-maemo6.c b/audio/telephony-maemo6.c index 41950be90..e8b75fd5a 100644 --- a/audio/telephony-maemo6.c +++ b/audio/telephony-maemo6.c @@ -1311,9 +1311,12 @@ static void hal_battery_level_reply(DBusPendingCall *call, void *user_data) goto done; } - dbus_message_get_args(reply, NULL, + if (!dbus_message_get_args(reply, NULL, DBUS_TYPE_INT32, &level, - DBUS_TYPE_INVALID); + DBUS_TYPE_INVALID)) { + error("Unexpected args in hald reply"); + goto done; + } *value = (int) level; -- cgit v1.2.1